-
Notifications
You must be signed in to change notification settings - Fork 637
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
87 lines (84 loc) · 2.61 KB
/
docker-compose.yaml
File metadata and controls
87 lines (84 loc) · 2.61 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
services:
fastapi:
build:
context: .
dockerfile: Dockerfile.webserver
environment:
- OTEL_SERVICE_NAME=rlswarm-fastapi
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
depends_on:
- otel-collector
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/healthz"]
interval: 30s
retries: 3
otel-collector:
image: otel/opentelemetry-collector-contrib:0.120.0
ports:
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "55679:55679" # Prometheus metrics (optional)
environment:
- OTEL_LOG_LEVEL=DEBUG
healthcheck:
test: ["CMD", "grpc_health_probe", "-addr=localhost:4317"]
interval: 5s
retries: 5
swarm-cpu:
profiles: ["swarm"]
build:
context: .
dockerfile: containerfiles/swarm-node/swarm.containerfile
args:
- BASE_IMAGE=ubuntu:24.04
depends_on:
- ollama
ports:
- 3000:3000
volumes:
- ./user/modal-login:/home/gensyn/rl_swarm/modal-login/temp-data
- ./user/keys:/home/gensyn/rl_swarm/keys
- ./user/configs:/home/gensyn/rl_swarm/configs
- ./user/logs:/home/gensyn/rl_swarm/logs
environment:
- HF_TOKEN=${HF_TOKEN}
- GENSYN_RESET_CONFIG=${GENSYN_RESET_CONFIG}
- OLLAMA_HOST=http://ollama:11434
# Requires the NVIDIA Drivers version >=525.60.13 to be installed, as well
# as the nvidia-container-toolkit.
# https://docs.nvidia.com/deploy/cuda-compatibility/index.html#cuda-11-and-later-defaults-to-minor-version-compatibility
# https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/
# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
swarm-gpu:
profiles: ["swarm"]
build:
context: .
dockerfile: containerfiles/swarm-node/swarm.containerfile
args:
- BASE_IMAGE=nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04
depends_on:
- ollama
ports:
- 3000:3000
volumes:
- ./user/modal-login:/home/gensyn/rl_swarm/modal-login/temp-data
- ./user/keys:/home/gensyn/rl_swarm/keys
- ./user/configs:/home/gensyn/rl_swarm/configs
- ./user/logs:/home/gensyn/rl_swarm/logs
environment:
- HF_TOKEN=${HF_TOKEN}
- GENSYN_RESET_CONFIG=${GENSYN_RESET_CONFIG}
- OLLAMA_HOST=http://ollama:11434
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ollama:
image: ollama/ollama:0.11.10
ports:
- "11434:11434"
volumes:
- ./ollama-data:/root/.ollama