File size: 797 Bytes
b9b1e87 |
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 |
version: '3.8'
services:
compact-ai-model:
build: .
ports:
- "8000:8000"
environment:
- MODEL_SIZE=small
- API_HOST=0.0.0.0
- API_PORT=8000
volumes:
- ./checkpoints:/app/checkpoints
- ./data:/app/data
deploy:
resources:
limits:
memory: 4G
cpus: '2.0'
reservations:
memory: 2G
cpus: '1.0'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# Optional: Add a reverse proxy
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- compact-ai-model
profiles:
- prod |