A miner consists of serveral parts, fitting into two categories:
Proxy
Workers
The proxy server is the server which has your hotkey, and spins up the axon (should probably be on a CPU close to your GPU worker servers). The worker servers are the GPU workers which perform the tasks!
I would advise starting with the worker servers. The simplest way to get started is to spin up four worker servers:
One for the mixtral chat model
One for the image generation stuff
One for the llama3 chat model
Worker server setup
I recommend using bare metal where possible. The documentation for bare metal can be found in here https://github.com/namoray/vision-workers
Below is the documentation for a template provder, such as runpod:
⚠️USE 11.8 <= CUDA <=12.2 For an easier life! ⚠️
Template setup
I'll use runpod as example, as it's easy with them
I would recommend either a RTX4090 or H100 or A100
Getting the address of the servers
Navigate to one of the pods, click 'connect', and then click the orange button, and copy the URL in your browser
Proxy server setup
Get a CPU VM (Digital Ocean Droplet, OVH, Vultr, etc) - make sure you have an open port if you want to run a organic API server.
Note: Runpod CPU's don't seem to be the best
If you pick a runpod cpu, i would advise running this
ulimit -n 4096
Setup environment
Note: if you're using a provider such as runpod or vast, make sure you expose the necessary ports first, e.g.: https://docs.runpod.io/docs/expose-ports#:~:text=If%20your%20pod%20supports%20a,address%20to%20access%20your%20service. Follow the "Symmetrical port mapping" step :)
Clone the repo
git clone https://github.com/namoray/vision.git
cd vision
Install system dependencies
If you are in a container such as runpod, run these:
### Install pm2 & jqapt update &&apt upgrade -y
aptinstall nodejs npm -y
npm i -g pm2
apt-getinstall -y jq
### Install nano so you can edit the config easilyapt-get update
apt-getinstallnano
If you are on a bare metal machine (e.g. Vast) where you require
sudo
, use the following:
### Install pm2 & jqsudoapt update &&apt upgrade -y
sudoaptinstall nodejs npm -y
sudonpm i -g pm2
sudoapt-getinstall -y jq
### Install nano so you can edit the config easilysudoapt-get update
sudoapt-getinstallnano
Install python dependencies
Make sure you have installed the correct python version (python 3.10). If you don't, try this:
, you should make sure that requirements are correctly installed
Configure the task_config & task_concurrency_config json's
For each hotkey, there was default task configuration created in the sqlite db.
View this with
./peer_at_sql_db.sh
For a GUI, or
sudoaptinstall sqlite3
sqlite3 vision_database.db
For no gui
The default values for volumes are 1/2 of the maximum allowed values. These are filled EITHER:
When you use vision create-config
run
python set_miner_defaults.py
Task config
Here we defined the capacitity (or volume) for each task, for that miner. This is the maximum amount of 'work' that a hotkey can do in a 1 hour period. To calculate that work, you can use
calculate_volumes_example.py
tool.
Concurrency groups
We also define the
concurrency groups
. All the tasks belong to a concurrency group, and you can configure a maximum number of concurrent requests for that group, which is shared between all the tasks in that group
Start miners
Autoupdates
Announcements will still be made ahead of time. If you choose to run autoupdates as a miner, make sure your ./start_miners.sh
script is up to date & working, and I would advise monitoring around update releases regardless.
You're of course free to change or use whatever autoupdater you like!
Power to infer from AI models is largely concentrated in the hands of big providers. S19 aims to smash this problem, by bringing decentralised inference to the masses