-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
169 lines (160 loc) · 4.93 KB
/
Copy pathdocker-compose.yml
File metadata and controls
169 lines (160 loc) · 4.93 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
version: '3.8'
services:
redis:
image: redis:8.2-alpine
command: redis-server --appendonly yes
healthcheck:
test: redis-cli ping
volumes:
- redis:/data
logging: &logging
driver: journald
options:
tag: '{{.Name}}'
db:
image: postgres:14.0-alpine
healthcheck:
test: pg_isready -U postgres || exit 1
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB:postgres
volumes:
- db:/var/lib/postgresql/data
logging:
<<: *logging
pylon:
image: docker.io/backenddevelopersltd/bittensor-pylon:2.3.1
init: true
restart: unless-stopped
env_file: ./.env
environment:
- BITTENSOR_WALLET_PATH=/root/.bittensor/wallets
- PYLON_IDENTITIES=["miner"]
- PYLON_ID_MINER_WALLET_NAME=${BITTENSOR_WALLET_NAME}
- PYLON_ID_MINER_HOTKEY_NAME=${BITTENSOR_WALLET_HOTKEY_NAME}
- PYLON_ID_MINER_NETUID=${BITTENSOR_NETUID:-12}
- PYLON_ID_MINER_TOKEN=${PYLON_IDENTITY_TOKEN:-miner_token}
volumes:
- ${HOST_WALLET_DIR}:/root/.bittensor/wallets
logging:
<<: *logging
app:
image: backenddevelopersltd/${MINER_IMAGE_REPO}:${MINER_IMAGE_TAG:-v0-latest}
pull_policy: always
healthcheck:
test: wget -q --spider 127.0.0.1:8000/admin/login/ || exit 1
init: true
restart: unless-stopped
env_file: ./.env
environment:
- MINER_RUNNER_VERSION=${MINER_RUNNER_VERSION}
- PROMETHEUS_MULTIPROC_DIR=/prometheus-multiproc-dir
- VENDOR_DIRECTORY=/root/vendor
- LOCAL_RECEIPTS_ROOT=/receipts/
volumes:
- ${HOST_WALLET_DIR}:/root/.bittensor/wallets
- ${HOST_VENDOR_DIR:-/tmp}:/root/vendor
# mounting host docker socket to allow running executor images on host machine
- /var/run/docker.sock:/var/run/docker.sock
- static:/root/src/static
- receipts:/receipts/
depends_on:
- redis
- db
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
celery-worker:
image: backenddevelopersltd/${MINER_IMAGE_REPO}:${MINER_IMAGE_TAG:-v0-latest}
pull_policy: always
init: true
healthcheck:
test: celery -A compute_horde_miner status > /dev/null || exit 1
restart: unless-stopped
env_file: ./.env
environment:
- CELERY_MASTER_CONCURRENCY=4
- CELERY_WORKER_CONCURRENCY=2
- PROMETHEUS_MULTIPROC_DIR=/prometheus-multiproc-dir
- VENDOR_DIRECTORY=/root/vendor
- LOCAL_RECEIPTS_ROOT=/receipts/
volumes:
- ${HOST_WALLET_DIR}:/root/.bittensor/wallets
- ${HOST_VENDOR_DIR:-/tmp}:/root/vendor
- receipts:/receipts/
command: ./celery-entrypoint.sh
tmpfs: /run
depends_on:
- redis
- db
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
celery-beat:
image: backenddevelopersltd/${MINER_IMAGE_REPO}:${MINER_IMAGE_TAG:-v0-latest}
pull_policy: always
init: true
restart: unless-stopped
env_file: ./.env
environment:
- PROMETHEUS_MULTIPROC_DIR=/prometheus-multiproc-dir
- LOCAL_RECEIPTS_ROOT=/receipts/
volumes:
- ${HOST_WALLET_DIR}:/root/.bittensor/wallets
- receipts:/receipts/
command: nice celery -A compute_horde_miner beat -l INFO --schedule /tmp/celerybeat-schedule -f /tmp/celery-beat.log
depends_on:
- redis
- db
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
nginx:
image: backenddevelopersltd/${MINER_NGINX_IMAGE_REPO}:${MINER_IMAGE_TAG:-v0-latest}
restart: unless-stopped
healthcheck:
test: wget -q --spider 0.0.0.0:80/admin/login/ || exit 1
env_file: ./.env
volumes:
- static:/srv/static:ro
- receipts:/receipts/:ro
depends_on:
- app
command: nginx -g 'daemon off;'
ports:
- ${BITTENSOR_MINER_PORT}:80
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
docuum:
image: stephanmisc/docuum:0.23.1
command: [
"--threshold", "${DOCKER_STORAGE_THRESHOLD:-50 GB}",
"--keep", "^redis:8.2-alpine",
"--keep", "^postgres:14.0-alpine",
"--keep", "^nickfedor/watchtower",
"--keep", "^stephanmisc/docuum:0.23.1",
"--keep", "^backenddevelopersltd/compute-horde-miner-runner:v0-latest",
"--keep", "^backenddevelopersltd/${MINER_IMAGE_REPO}:v0-(latest|preprod)",
"--keep", "^backenddevelopersltd/compute-horde-miner-nginx:v0-latest",
"--keep", "^backenddevelopersltd/${MINER_NGINX_IMAGE_REPO}:v0-(latest|preprod)",
"--keep", "^backenddevelopersltd/compute-horde-job:v0-latest",
"--keep", "^us-central1-docker.pkg.dev/twistlock-secresearch/public/can-ctr-escape-cve-2022-0492:latest",
]
init: true
restart: unless-stopped
volumes:
- docuum:/root
- /var/run/docker.sock:/var/run/docker.sock
logging:
<<: *logging
volumes:
redis:
db:
static:
receipts:
docuum: