-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.common.yml
216 lines (204 loc) · 6.1 KB
/
docker-compose.common.yml
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
services:
x-web:
image: nginx:1.27.1
volumes:
- ./web/templates:/etc/nginx/templates
ports:
- "${WEB_HTTP_PORT}:80"
environment:
- NGINX_HOST=${WEB_DOMAIN}
- NGINX_PORT=80
networks:
default:
aliases:
- web
x-redis:
image: distributed-inference/redis
build:
context: redis # Dockerfile location
args:
# See for available variants: https://hub.docker.com/_/redis?tab=tags
- VARIANT:7.2.5-bookworm
volumes:
- "./redis/templates:/templates:cached"
- "./data/redis/data:/data"
environment:
- REDIS_PORT
- REDIS_PASSWORD
networks:
default:
aliases:
- redis
x-ui:
image: distributed-inference/ui
build:
context: ui # Dockerfile location
args:
# See for available variants: https://github.com/devcontainers/images/tree/main/src/typescript-node
- VARIANT:22-bookworm
environment:
- WEB_HTTP_PORT
volumes:
# Mount the root folder that contains .git
- "./ui:/workspace:cached"
networks:
default:
aliases:
- ui
x-signaling:
image: distributed-inference/signaling
build:
context: signaling # Dockerfile location
args:
# See for available variants: https://hub.docker.com/_/golang?tab=tags
- VARIANT:1.23.0-bookworm
# See: https://code.visualstudio.com/docs/remote/create-dev-container#_set-up-a-folder-to-run-in-a-container
# [Optional] Required for ptrace-based debuggers like C++, Go, and Rust
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
volumes:
# Mount the root folder that contains .git
- "./signaling:/workspace:cached"
environment:
- REDIS_HOST
- REDIS_PORT
- REDIS_PASSWORD
networks:
default:
aliases:
- signaling
x-mediabridge:
image: distributed-inference/mediabridge
build:
context: mediabridge # Dockerfile location
args:
# See for available variants: https://hub.docker.com/_/golang?tab=tags
- VARIANT:1.23.0-bookworm
# See: https://code.visualstudio.com/docs/remote/create-dev-container#_set-up-a-folder-to-run-in-a-container
# [Optional] Required for ptrace-based debuggers like C++, Go, and Rust
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
volumes:
# Mount the root folder that contains .git
- "./mediabridge:/workspace:cached"
ports:
- "${MEDIABRIDGE_UDP_PORT}:${MEDIABRIDGE_UDP_PORT}/udp"
environment:
- REDIS_HOST
- REDIS_PORT
- REDIS_PASSWORD
- MEDIABRIDGE_DOCKER_HOST_IP
- MEDIABRIDGE_UDP_PORT
x-inference:
image: distributed-inference/inference
build:
context: inference # Dockerfile location
volumes:
- "./inference:/workspace:cached"
environment:
- PYTHONUNBUFFERED="1"
- REDIS_HOST
- REDIS_PORT
- REDIS_PASSWORD
x-gpu-inference:
extends:
service: x-inference
image: distributed-inference/inference-gpu
build:
context: inference # Dockerfile location
dockerfile: Dockerfile.cuda
args:
- CUDA_VERSION=${CUDA_VERSION:-12.5.1}
- CUDNN_VERSION=${CUDNN_VERSION:-}
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
x-grafana:
image: grafana/grafana:11.2.0
user: "472"
volumes:
- ./data/grafana/data:/var/lib/grafana
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_PASSWORD
- "GF_SERVER_ROOT_URL=http://${WEB_DOMAIN}:${WEB_HTTP_PORT}/grafana"
- GF_SERVER_SERVE_FROM_SUB_PATH=true
- "GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/distributed-inference-dashboard.json"
- INFLUXDB_HOST
- INFLUXDB_PORT
- DOCKER_INFLUXDB_INIT_USERNAME
- DOCKER_INFLUXDB_INIT_PASSWORD
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
- DOCKER_INFLUXDB_INIT_ORG
- DOCKER_INFLUXDB_INIT_BUCKET
networks:
default:
aliases:
- grafana
x-influxdb:
image: influxdb:2.7.10
volumes:
- ./data/influxdbv2:/var/lib/influxdb2:rw
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME
- DOCKER_INFLUXDB_INIT_PASSWORD
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
- DOCKER_INFLUXDB_INIT_ORG
- DOCKER_INFLUXDB_INIT_BUCKET
networks:
default:
aliases:
- influxdb
x-telegraf:
image: telegraf:1.31.3
privileged: true
user: root
entrypoint: "telegraf"
volumes:
- ./monitoring/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
# See: (Windows) https://stackoverflow.com/a/41005007
# See: (MacOS) https://github.com/docker/for-mac/issues/4755
- ${DOCKER_SOCKET_PREFIX}/var/run/docker.sock${DOCKER_SOCKET_SUFFIX}:/var/run/docker.sock:ro
environment:
- INFLUXDB_HOST
- INFLUXDB_PORT
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
- DOCKER_INFLUXDB_INIT_ORG
- DOCKER_INFLUXDB_INIT_BUCKET
- HOSTNAME_TAG
networks:
default:
aliases:
- telegraf
# See: Agent mode: https://prometheus.io/blog/2021/11/16/agent/
x-prometheus:
image: prom/prometheus:v2.54.1
user: root:root
volumes:
- ./monitoring/prometheus/config:/etc/prometheus
- ./data/prometheus/data:/prometheus
# See: (Windows) https://stackoverflow.com/a/41005007
# See: (MacOS) https://github.com/docker/for-mac/issues/4755
- ${DOCKER_SOCKET_PREFIX}/var/run/docker.sock${DOCKER_SOCKET_SUFFIX}:/var/run/docker.sock
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.agent.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
- '--enable-feature=agent'
# See: https://blog.cubieserver.de/2020/configure-prometheus-on-a-sub-path-behind-reverse-proxy/
- '--web.external-url=/prometheus/'
- '--web.route-prefix=/prometheus/'
networks:
default:
aliases:
- prometheus