-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.gpu.yml
More file actions
34 lines (32 loc) · 972 Bytes
/
docker-compose.gpu.yml
File metadata and controls
34 lines (32 loc) · 972 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
32
33
34
# Overlay for NVIDIA GPU (Linux host + NVIDIA drivers + nvidia-container-toolkit).
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d --build
#
# Not for Docker Desktop on macOS — Apple GPUs are not exposed as CUDA inside Linux containers.
# Ollama + worker share the GPU; adjust OLLAMA_NUM_PARALLEL if you hit VRAM limits.
services:
ollama:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
worker:
build:
context: ./contentforge
dockerfile: Dockerfile.gpu
shm_size: "4gb"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
NVIDIA_VISIBLE_DEVICES: all
# Optional: more threads for dataloader / numpy alongside GPU
OMP_NUM_THREADS: "8"
MKL_NUM_THREADS: "8"