compact-ai-model / docker-compose.yml
likhonsheikh's picture
Upload folder using huggingface_hub
b9b1e87 verified
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