Installation
The validator uses the same repository as the miner. If you've already set up a miner on this machine, skip to step 3.
1. Clone the Repository
git clone https://github.com/blockzero-subnet/weightnet
cd weightnet
2. Create a Virtual Environment
Create and activate a virtual environment before installing any dependencies:
python -m venv .venv
source .venv/bin/activate
3. Install Dependencies
Install build tools and project dependencies:
sudo apt-get update
sudo apt-get install -y build-essential python3-dev
pip install -r requirements.txt
pip install -e .
This installs all required packages (including Bittensor, PyTorch, FastAPI, and uvicorn). There is no need to install Bittensor or the base model separately.
4. Register on the Subnet
btcli subnets register \
--netuid <NETUID> \
--wallet-name <MY_COLDKEY_NAME> \
--hotkey <MY_HOTKEY_NAME> \
--subtensor.network test
5. Generate a Config File
Create a template config file for your validator:
python mycelia/shared/config.py \
--get_template validator \
--coldkey_name <your coldkey name> \
--hotkey_name <your hotkey name> \
--run_name <your naming to specify this run>
Edit the generated YAML config to adjust any specifics.
Verify Everything
# Check GPU
python -c "import torch; print(f'CUDA: {torch.cuda.is_available()}, VRAM: {torch.cuda.get_device_properties(0).total_mem / 1e9:.1f}GB')"
# Check bittensor
python -c "import bittensor; print(bittensor.__version__)"
Proceed to Running Your Validator when all checks pass.