Files
VoiceStudio/docker-compose.yml
T
debpalash 9cf900006e feat: docker DX — /health endpoint, CPU/GPU profiles, fixed port
- Add /health endpoint returning {'status':'ok','device':'...'} for
  Docker health checks and monitoring
- Rewrite docker-compose.yml: CPU default + GPU via --profile flag so
  CPU-only machines don't get nvidia driver errors
- Named volumes, proper health checks with start_period for first-run
  model downloads
- Fix README Docker quickstart: wrong port (8000→3900), add GPU
  profile instructions
2026-04-28 11:22:43 +05:30

65 lines
2.1 KiB
YAML

# ──────────────────────────────────────────────────────────────
# OmniVoice Studio — Docker Compose
#
# Quick start:
# docker compose up # CPU mode
# docker compose --profile gpu up # NVIDIA GPU mode
#
# First run downloads ~4 GB of models. Progress is shown in logs.
# Open http://localhost:3900 once the health check passes.
# ──────────────────────────────────────────────────────────────
services:
# ── CPU mode (default) ──────────────────────────────────────
omnivoice:
build: .
container_name: omnivoice-studio
ports:
- "3900:3900"
volumes:
- omnivoice-data:/app/omnivoice_data
environment:
- HF_HOME=/app/omnivoice_data/huggingface
- HF_TOKEN=${HF_TOKEN:-}
- OMNIVOICE_DATA_DIR=/app/omnivoice_data
- PYTHONUNBUFFERED=1
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3900/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
restart: unless-stopped
# ── GPU mode — activate with: docker compose --profile gpu up
omnivoice-gpu:
build: .
container_name: omnivoice-studio-gpu
profiles: ["gpu"]
ports:
- "3900:3900"
volumes:
- omnivoice-data:/app/omnivoice_data
environment:
- HF_HOME=/app/omnivoice_data/huggingface
- HF_TOKEN=${HF_TOKEN:-}
- OMNIVOICE_DATA_DIR=/app/omnivoice_data
- PYTHONUNBUFFERED=1
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3900/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 180s
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
restart: unless-stopped
volumes:
omnivoice-data: