Skip to content

Release 4.5.2

Choose a tag to compare

@dylanuys dylanuys released this 20 Feb 21:12
· 76 commits to main since this release
f3f504c

Validators can now run as Docker containers alongside the existing pm2 setup. pm2 remains the default — Docker is an explicit opt-in via --docker on all gascli validator commands.

Running with pm2 (default)

gascli v start
gascli v stop
gascli v logs

Running with Docker

gascli v start  --docker
gascli v stop   --docker
gascli v delete --docker
gascli v status --docker
gascli v logs   --docker

Or directly via Compose:

docker compose --env-file .env.validator up -d

Architecture

Three containers share a single bitmind-subnet-validator image, each running one service (controlled by the SERVICE env var):

Container Role
validator Core validation loop, FastAPI callback server
generator Image/video generation (GPU-enabled)
data Dataset downloads and cache management

Configuration

.env.validator is the single source of truth for both container environment and Compose variable substitution (bind-mount paths, ports, etc.). Copy the template and fill in your details:

cp .env.validator.template .env.validator

Key fields:

Variable Description
WALLET_PATH Host path to your Bittensor wallets directory
WALLET_NAME / WALLET_HOTKEY Only that wallet's subdirectory is bind-mounted
BT_LOGGING_LOGGING_DIR Base path for validator state and Bittensor logs
SN34_CACHE_DIR Model/data cache — shared between pm2 and Docker, no re-downloading when switching
HF_HOME Hugging Face cache — also shared with pm2
CALLBACK_PORT Port miners call back to; exposed via network_mode: host
NETUID Auto-derived from CHAIN_ENDPOINT; set explicitly to override

Persistent state

Scores, challenge tasks, and Bittensor logs are bind-mounted from the host under BT_LOGGING_LOGGING_DIR/WALLET_NAME/WALLET_HOTKEY/ and survive container restarts.

Automatic updates

A cron-friendly docker/autoupdate.sh script pulls the latest image and restarts containers:

*/5 * * * * /path/to/bitmind-subnet/docker/autoupdate.sh >> /var/log/bitmind-docker-update.log 2>&1

Viewing logs

# via gascli
gascli v logs --docker

# directly (per service)
docker compose logs -f validator   # or generator, data