-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (87 loc) · 2.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (87 loc) · 2.27 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
# Docker Compose stack for rag-retrieval-benchmark.
#
# Services:
# qdrant - vector database (CPU only)
# jupyter - JupyterLab with GPU access, for running the phase notebooks
# api - FastAPI service exposing retrieval/evaluation endpoints (GPU access)
#
# The jupyter and api services share one image built from docker/Dockerfile.
# GPU access uses the Compose device-reservation syntax and requires the NVIDIA
# Container Toolkit on the host.
services:
qdrant:
image: qdrant/qdrant:latest
container_name: rrb-qdrant
ports:
- "6333:6333" # REST API
- "6334:6334" # gRPC API
volumes:
- qdrant_storage:/qdrant/storage
healthcheck:
# Qdrant exposes a readiness endpoint at /readyz.
test: ["CMD", "bash", "-lc", "exec 3<>/dev/tcp/localhost/6333"]
interval: 10s
timeout: 5s
retries: 10
jupyter:
build:
context: .
dockerfile: docker/Dockerfile
image: rag-retrieval-benchmark:latest
container_name: rrb-jupyter
command: >
jupyter lab
--ip=0.0.0.0
--port=8888
--no-browser
--allow-root
--ServerApp.token=''
--ServerApp.root_dir=/app
ports:
- "8888:8888"
env_file:
- .env
volumes:
- .:/app
- hf_cache:/app/.cache/huggingface
depends_on:
qdrant:
condition: service_started
# GPU access (NVIDIA Container Toolkit required on the host).
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
api:
build:
context: .
dockerfile: docker/Dockerfile
image: rag-retrieval-benchmark:latest
container_name: rrb-api
command: >
uvicorn rag_retrieval_benchmark.api.main:app
--host 0.0.0.0
--port 8000
ports:
- "8000:8000"
env_file:
- .env
volumes:
- .:/app
- hf_cache:/app/.cache/huggingface
depends_on:
qdrant:
condition: service_started
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
qdrant_storage:
hf_cache: