Files
Nat20-Notes/docker-compose.example.yml

34 lines
714 B
YAML

# Example Docker Compose — uses a named volume so data persists across rebuilds
# without needing a specific host path. Copy to docker-compose.yml and customise.
services:
backend:
build: ./backend
restart: unless-stopped
volumes:
- app_data:/data
- hf_cache:/root/.cache/huggingface
- torch_cache:/root/.cache/torch
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
ports:
- "8000:8000"
frontend:
build: ./frontend
restart: unless-stopped
depends_on:
- backend
ports:
- "8020:8020"
volumes:
app_data:
hf_cache:
torch_cache: