-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.gpu.yml
More file actions
27 lines (26 loc) · 954 Bytes
/
docker-compose.gpu.yml
File metadata and controls
27 lines (26 loc) · 954 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
# GPU override for Ollama — combined with the base file via:
#
# docker compose -f docker-compose.yml -f docker-compose.gpu.yml --profile gpu up -d
#
# Gotcha (verified 2026-05-20): the `deploy.resources.reservations.devices`
# block is silently no-op'd if `nvidia-container-runtime` is NOT the configured
# Docker runtime. Verify the host BEFORE invoking the gpu profile:
#
# docker info | grep -i runtime # must show "nvidia"
# nvidia-smi # must show the GPU
#
# After bringing the stack up, confirm GPU passthrough inside the container:
#
# docker exec forecastlab-ollama nvidia-smi
#
# See `docs/rag-ollama-setup.md` for embedding-model pull instructions
# (`ollama pull nomic-embed-text`) and the in-cluster `http://ollama:11434` URL.
services:
ollama:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]