-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathdocker-compose.vali.yml
More file actions
98 lines (94 loc) · 4.05 KB
/
Copy pathdocker-compose.vali.yml
File metadata and controls
98 lines (94 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
services:
validator:
image: entrius/gittensor:latest
container_name: gt-vali
restart: unless-stopped
mem_limit: "3g"
entrypoint: /app/scripts/vali-entrypoint.sh
env_file:
- .env
ports:
# Set AXON_PUBLISH=127.0.0.1:<port> to bind loopback-only behind a reverse proxy (unset = raw internet publish).
- "${AXON_PUBLISH:-0.0.0.0:${PORT}}:${PORT}"
# Serving inference API (opt-in, see .env.example): loopback on the host by default; front it with your reverse proxy.
- "${SERVING_API_PUBLISH:-127.0.0.1:${SERVING_API_PORT:-8790}}:${SERVING_API_PORT:-8790}"
volumes:
# 'ro' = readonly
- ${WALLET_PATH}:/root/.bittensor/wallets:ro
# state.npz, serving.db and the rotating bittensor.log live under ./data/<wallet>/<hotkey>/netuid<N>/validator
# (the entrypoint passes --logging.logging_dir /app/data), so they outlive the container.
- ./data:/app/data
# `docker logs` buffer: 3 x 10 MB, oldest dropped. Dies with the container — the durable copy is the
# rotating bittensor.log under ./data (LOG_FILE_MAX_MB / LOG_FILE_BACKUPS).
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# optional: uncomment this if you are running validator database
# networks:
# - gittensor_network
labels:
- "com.centurylinklabs.watchtower.enable=true"
# Optional reference runtime for the serving audit loop (profile "reference"). Runs the same blessed
# sparkinfer_server image miners run (built by us from a pinned upstream commit, docker/sparkinfer.Dockerfile),
# on the validator's own GPU, so audits compare against a live honest copy instead of a bank snapshot.
# SPARKINFER_TAG=<runtime_pin commit> docker compose -f docker-compose.vali.yml --profile reference up -d
# then set SERVING_REFERENCE_URL=http://reference:8080 and SERVING_ATTEST_REFERENCE_URL=http://attest:8081 in .env.
# See the Serving Runtime Contract in the miner docs.
reference:
image: entrius/sparkinfer:${SPARKINFER_TAG:-latest}
container_name: gt-vali-reference
restart: unless-stopped
profiles: ["reference"]
environment:
# The release's artifact, from serving_loadout.json: a GGUF (model_sha256) or a pinned Hugging Face model
# directory (model_dir.repo / revision / sha256) — docker/sparkinfer-entrypoint.sh. Same values a miner runs.
MODEL_SHA256: ${SPARKINFER_MODEL_SHA256:-}
MODEL_REPO: ${SPARKINFER_MODEL_REPO:-}
MODEL_FILE: ${SPARKINFER_MODEL_FILE:-}
MODEL_DIR_REPO: ${SPARKINFER_MODEL_DIR_REPO:-}
MODEL_DIR_REVISION: ${SPARKINFER_MODEL_DIR_REVISION:-}
MODEL_DIR_SHA256: ${SPARKINFER_MODEL_DIR_SHA256:-}
TOK_REPO: ${SPARKINFER_TOK_REPO:-}
MODEL_NAME: ${SPARKINFER_MODEL_NAME:-}
CTX: ${SPARKINFER_CTX:-}
# already baked into the image; repeated here so nobody turns it off by accident (contract D1)
SPARKINFER_DETERMINISTIC: "1"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
- ./data/models:/opt/sparkinfer/models
# Attestation sidecar beside the reference (profile "reference"): the validator asks it for the expected digest
# and reference wall time of each round's challenge. Same image every miner box runs (attest.image in the loadout).
attest:
image: entrius/gt-attest:${GT_ATTEST_TAG:-v1}
container_name: gt-vali-attest
restart: unless-stopped
profiles: ["reference"]
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
watchtower:
image: nickfedor/watchtower
container_name: gittensor-watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
WATCHTOWER_POLL_INTERVAL: 200
WATCHTOWER_LABEL_ENABLE: "true"
WATCHTOWER_CLEANUP: "true"
# uncomment this if you are running validator database
# networks:
# gittensor_network:
# external: true