Miner Guide
Start mining Mosaic on the Commune subnet (uid 14)
Hardware Requirements
Memory: >= 16GB
GPU: >= 16GB VRAM
Storage: >= 50GB
Public IP
System Requirements
NVIDIA GPU Driver installed
Python >= 3.10
comx cli tool for commune key management
CUDA >= 12.2 (no need if running with Docker)
Register your miner as a module
First, you need to create a key for your miner if you dont have one:
comx key create <key-name>
Then, transfer some $COMAI to your key, and register your miner as a module:
comx module register <module-name> <key-name> --netuid=14 --ip=<ip> --port=<port>
The IP and port should both be public for the validator to access them.
Option 1: Run with Docker (Recommended)
We highly recommend using Docker to run the miner. This method can increase the robustness of the services and enable automatic upgrades.
Prerequisites
You need to install the following components:
Run miner with docker
docker run --gpus=all -d --network host --restart always \
-v $HOME/.commune:/root/.commune \
-v $HOME/.cache/huggingface:/root/.cache/huggingface \
--name mosaic-miner \
mos4ic/mosaic-subnet:latest \
python mosaic_subnet/cli.py miner <key-name> 0.0.0.0 <port>
Enable auto upgrade
This container will periodically check for the latest mosaic docker image, pull it, and restart the running containers using the new image.
docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower --interval 300 mosaic-miner
Option 2: Run with source code
Installation
Install Poetry and run the following commands:
# clone this project
git clone https://github.com/mosaicx-org/mosaic-subnet
cd mosaic-subnet
# start virtualenv and enter it
poetry shell
# install dependencies
poetry install
Run miner with Python
python mosaic_subnet/cli.py miner <key-name> 0.0.0.0 <port>
Last updated