DOCKER-BASED DEPLOYMENT This guide covers Docker Compose deployment - the recommended method for running validators. Docker ensures consistent environments, simplified updates, and production-ready isolation.
This guide walks you through:
- Installing Docker and system dependencies
- Creating and registering a Bittensor validator wallet
- Configuring your validator environment
- Starting and verifying your validator
- Monitoring and maintaining your validator
For system architecture details, see architecture.md.
Recommended Specifications:
- OS: Ubuntu 22.04 LTS or Debian 11+
- RAM: 16 GB minimum (32 GB recommended for concurrent sandbox execution)
- CPU: 4 cores minimum (8+ recommended)
- Disk: 100 GB SSD with good IOPS (database + agent storage + sandbox space)
- Network: Stable internet connection with low latency
- Docker: Docker Engine 20.10+ and Docker Compose V2
Minimum Stake Requirements:
- Testnet (netuid 155): Minimal TAO (available from faucet)
- Mainnet (netuid 6): 10,000 TAO minimum stake
How Validators Work:
- Pull Events: Fetch binary prediction events from Numinous API
- Pull Agent Code: Download Python agent code submitted by miners via API
- Execute in Sandboxes: Run each miner's agent in isolated Docker containers
- Collect Predictions: Store predictions with run_id (execution UUID) and version_id (agent version)
- Score Performance: Compute a Brier score over miner predictions
- Set Weights: Update Bittensor subnet weights based on scores
Sandbox Architecture:
- Validators run in a container but create sibling sandbox containers
- Sandbox containers have NO internet access (isolated network)
- Agents make API calls via signing proxy (validator authenticates on their behalf)
- Each execution is isolated with unique temp directory and strict resource limits
# Update system
sudo apt-get update && sudo apt-get upgrade -y
# Install Docker
sudo apt-get install -y docker.io docker-compose-plugin git python3 python3-pip
# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker
# Add user to docker group (avoids needing sudo)
sudo usermod -aG docker $USER
# Install Bittensor CLI
pip3 install bittensor
# Log out and back in for group changes to take effect
# Then verify installation
docker --version
docker compose version
btcli --versionNote: This guide uses Docker Compose V2 (docker compose).
git clone https://github.com/numinouslabs/numinous.git
cd numinousCreate and register your validator wallet. See wallet-setup.md for detailed instructions.
# Create wallet
btcli wallet new_coldkey --wallet.name validator
btcli wallet new_hotkey --wallet.name validator --wallet.hotkey default
# Register on subnet
# Testnet: --netuid 155 --subtensor.network test
# Mainnet: --netuid 6 --subtensor.network finney
btcli subnet register --wallet.name validator --wallet.hotkey default --netuid 6 --subtensor.network finneyCreate environment file from template:
cp .env.validator.example .env.validatorEdit the file with your wallet configuration:
vim .env.validatorRequired variables:
# Wallet Configuration
# Must match directory names under ~/.bittensor/wallets/
WALLET_NAME=validator
WALLET_HOTKEY=defaultSave and exit
The validator runs inside a Docker container but needs to access your wallet files from the host machine. The HOST_WALLET_PATH environment variable tells the validator where to find wallets on your host filesystem.
The docker-compose.validator.yaml file is pre-configured with:
environment:
- HOST_WALLET_PATH=${HOME}/.bittensor/walletsThis works for most users who store wallets in the standard Bittensor location (~/.bittensor/wallets).
When you run docker compose:
${HOME}automatically expands to your home directory- For user
bob:/home/bob/.bittensor/wallets - For user
root:/root/.bittensor/wallets
If you store wallets in a non-standard location, edit your .env.validator file:
# Add or change this line in .env.validator
HOST_WALLET_PATH=/your/custom/path/to/walletsReplace /your/custom/path/to/wallets with your actual wallet directory path on the host machine.
Before starting, verify your wallet files exist at the expected location:
# Check wallet structure
ls -la ~/.bittensor/wallets/${WALLET_NAME}/coldkey
ls -la ~/.bittensor/wallets/${WALLET_NAME}/hotkeys/${WALLET_HOTKEY}
# If files exist, you're ready to start!If you see errors about wallet files not found:
- Verify wallet path: Check that
HOST_WALLET_PATHmatches where your wallets actually are - Check permissions: Ensure wallet files are readable
- Restart validator: After changing
HOST_WALLET_PATH, restart the validator
# Pull and start validator
docker compose -f docker-compose.validator.yaml --env-file .env.validator pull
docker compose -f docker-compose.validator.yaml --env-file .env.validator up -d
# View logs
docker logs -f numinous_validator# View logs
docker logs -f numinous_validator
# Check status
docker ps | grep numinous_validator
# Restart validator
docker compose -f docker-compose.validator.yaml --env-file .env.validator restart
# Update to new version
docker compose -f docker-compose.validator.yaml --env-file .env.validator pull
docker compose -f docker-compose.validator.yaml --env-file .env.validator up -d
# Stop validator
docker compose -f docker-compose.validator.yaml --env-file .env.validator down# Check Docker is running
docker ps
# Check wallet files exist
ls -la ~/.bittensor/wallets/validator/
# Check logs for errors
docker logs numinous_validator 2>&1 | grep -i error
# Verify wallet structure
cat .env.validator | grep WALLET_NAME
ls -la ~/.bittensor/wallets/validator/coldkey
ls -la ~/.bittensor/wallets/validator/hotkeys/default