pneumoops / docker-compose.yml
Prakhar54-byte's picture
Deploy build-99deee4
2e552e9 verified
Raw
History Blame Contribute Delete
939 Bytes
version: "3.9"
services:
# ─── Single container: FastAPI + Gradio on port 7860 ─────────────────────
# This mirrors the HF Spaces deployment (single exposed port).
# Access:
# UI β†’ http://localhost:7860/ui
# API β†’ http://localhost:7860/predict
# Health β†’ http://localhost:7860/health
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "7860:7860"
volumes:
- ./models:/app/models # hot-swap model files without rebuilding
environment:
- PYTHONPATH=/app
- PNEUMOOPS_PROFILE=chestmnist
- PORT=7860
# Optional: set PNEUMOOPS_API_KEY to protect /predict in production
# - PNEUMOOPS_API_KEY=change-me
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:7860/health"]
interval: 30s
timeout: 5s
start_period: 40s
retries: 3