-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.gpu.yml
More file actions
31 lines (30 loc) · 832 Bytes
/
Copy pathdocker-compose.gpu.yml
File metadata and controls
31 lines (30 loc) · 832 Bytes
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
# GPU overlay for docker-compose.yml. Gives the API and Ollama the host NVIDIA GPU and
# builds the CUDA app image. Requires the NVIDIA Container Toolkit.
#
# docker compose -f docker-compose.yml -f docker-compose.gpu.yml up --build
# docker compose exec ollama ollama pull llama3.1:8b # one-time
services:
api:
build:
context: .
dockerfile: Dockerfile.gpu
environment:
EMBED_DEVICE: cuda
RERANK_DEVICE: cuda
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ollama:
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]