File size: 970 Bytes
874c9a7 83180d6 874c9a7 | 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 | version: '3.8'
services:
human-to-comic:
build:
context: .
dockerfile: Dockerfile
container_name: human-to-comic-generator
ports:
- "7860:7860"
environment:
- TORCH_HOME=/app/.cache/torch
- PYTHONUNBUFFERED=1
- GENERATOR_CHECKPOINT=/app/model_weights/generator_best.pth
volumes:
- ./model_weights:/app/model_weights:ro
- torch_cache:/app/.cache/torch
- uploads:/app/uploads
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7860/api/predict"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
torch_cache:
driver: local
uploads:
driver: local
networks:
default:
name: human-to-comic-network
driver: bridge
|