-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml.example
More file actions
154 lines (140 loc) · 4.01 KB
/
docker-compose.yml.example
File metadata and controls
154 lines (140 loc) · 4.01 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
services:
api:
build: .
platform: linux/amd64
container_name: cap_server
volumes:
- /home/cap/data/share-images:/var/lib/cap/share-images
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "8000:8000"
env_file:
- .env
command: >
sh -c "sleep 15 && uvicorn src.cap.main:app --host 0.0.0.0 --port 8000"
depends_on:
jaeger:
condition: service_started
postgres:
condition: service_healthy
vllm:
condition: service_healthy
networks:
- app-network
postgres:
image: postgres:16
container_name: cap_postgres
ports:
- "5433:5432" # host access (avoid clashing with any local 5432)
env_file:
- .env
volumes:
- /home/cap/data/postgres:/var/lib/postgresql/data
- ./ops/sql/init-cap.sql:/docker-entrypoint-initdb.d/10-init-cap.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB:-postgres} -h localhost"]
interval: 5s
timeout: 3s
retries: 20
networks:
- app-network
redis:
image: redis:7-alpine
container_name: cap_redis
ports:
- "6379:6379"
volumes:
- /home/cap/data/redis:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
networks:
- app-network
qlever:
image: adfreiburg/qlever:latest
platform: linux/amd64
container_name: qlever
ports:
- "7001:7001" # QLever UI
- "7000:7000" # SPARQL endpoint
env_file:
- .env
user: "1000:1000"
volumes:
- /home/cap/data/qlever:/data
working_dir: /data
entrypoint: ["/bin/bash"]
command: ["-c", "ServerMain -i cardano -p 7000 -a ${VIRTUOSO_PASSWORD} --persist-updates --memory-max-size 16g"]
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:7000/ >/dev/null || exit 1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 30s
networks:
- app-network
jaeger:
image: jaegertracing/all-in-one:latest
platform: linux/amd64
container_name: jaeger
ports:
- "16688:16686" # UI
- "4319:4317" # OTLP gRPC
- "4322:4318" # OTLP HTTP
env_file:
- .env
networks:
- app-network
vllm:
image: vllm/vllm-openai:cu130-nightly-5bff999d12dd061c102381b0c9c5d364c5953ea2
container_name: vllm
ipc: host
gpus: all
ports:
- "8001:8000"
volumes:
- /home/cap/data/huggingface:/root/.cache/huggingface
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-0}
# Mint/Ubuntu typical driver lib locations (inside container when mounted by nvidia runtime)
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/nvidia/current
entrypoint:
- /bin/bash
- -lc
- >
set -euxo pipefail;
echo "=== nvidia-smi (inside container) ===";
nvidia-smi || true;
echo "=== libcuda candidates ===";
ldconfig -p | grep -E 'libcuda\.so|libnvidia-ml\.so' || true;
echo "=== show compat config ===";
ls -la /etc/ld.so.conf.d/ || true;
echo "=== remove cuda compat conf if present ===";
rm -f /etc/ld.so.conf.d/00-cuda-compat.conf || true;
ldconfig;
echo "=== libcuda after ldconfig ===";
ldconfig -p | grep -E 'libcuda\.so|libnvidia-ml\.so' || true;
echo "=== launching vllm serve ===";
exec vllm serve
--host 0.0.0.0
--port 8000
--model Qwen/Qwen3-8B-AWQ
--dtype auto
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8000/health >/dev/null || exit 1"]
interval: 10s
timeout: 5s
retries: 60
start_period: 120s
restart: unless-stopped
networks:
- app-network
networks:
app-network:
driver: bridge