-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (69 loc) · 2.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (69 loc) · 2.47 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
version: "3.9"
# ── LLM Benchmark Dashboard — Full Stack ─────────────────────────────
# Services: API server + Prometheus + Grafana
#
# Usage:
# docker compose up -d
# open dashboard/index.html ← frontend (static, no build needed)
# open http://localhost:3000 ← Grafana (admin/admin)
# open http://localhost:9090 ← Prometheus
#
# To run against real vLLM, set VLLM_REAL=1 in the api service.
services:
# ── Benchmark API ─────────────────────────────────────────────────
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- VLLM_REAL=0 # set to 1 to call real vLLM backend
- VLLM_BACKEND_URL=http://vllm-serve:8000
- LOG_LEVEL=info
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
networks:
- bench-net
# ── Prometheus ────────────────────────────────────────────────────
prometheus:
image: prom/prometheus:v2.51.0
ports:
- "9090:9090"
volumes:
- ./configs/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.time=7d
networks:
- bench-net
restart: unless-stopped
# ── Grafana ───────────────────────────────────────────────────────
grafana:
image: grafana/grafana:10.4.0
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana_data:/var/lib/grafana
- ./configs/grafana-datasource.yml:/etc/grafana/provisioning/datasources/prometheus.yml:ro
- ./dashboards/grafana-benchmark.json:/var/lib/grafana/dashboards/benchmark.json:ro
- ./configs/grafana-dashboard.yml:/etc/grafana/provisioning/dashboards/benchmark.yml:ro
depends_on:
- prometheus
networks:
- bench-net
restart: unless-stopped
volumes:
prometheus_data:
grafana_data:
networks:
bench-net:
driver: bridge