# Single-instance F5-TTS server. # For multi-instance scale-out (4× on a 16-core box, agoracosmica production # pattern), see docker-compose.scale.yml. services: f5-server: build: context: . dockerfile: Dockerfile image: chipmates/f5-server:latest ports: - "8000:8000" environment: # Checkpoint — auto-downloads from HuggingFace on first start. # Known options: "hvoss" (default), "aihpi". Both CC-BY-NC-4.0. # Pass an absolute path (e.g. /models/my_checkpoint.safetensors) to use # a custom commercially-licensed checkpoint. F5_DEFAULT_CKPT: "hvoss" F5_DEFAULT_LANGUAGE: "de" # Speed: 1.0 = engine-native (~180 WPM DE). Lower = slower. Apply per-request # via the `speed` param of /v1/audio/speech, or set a default here. F5_SPEED: "1.0" # CORS — "*" for hobbyist single-machine use, scope down for production. # Example: "https://yourdomain.com,http://localhost:5173" CORS_ALLOW_ORIGINS: "*" # CPU thread limits per instance — keep low if running multiple instances. OMP_NUM_THREADS: "4" MKL_NUM_THREADS: "4" volumes: # Persist downloaded checkpoint across `docker compose down`. - f5_models:/models # GPU — uncomment if you have nvidia-container-toolkit installed: # deploy: # resources: # reservations: # devices: # - driver: nvidia # count: 1 # capabilities: [gpu] restart: unless-stopped healthcheck: test: ["CMD", "curl", "-sf", "http://localhost:8000/health"] interval: 30s timeout: 10s start_period: 120s # Cold start downloads ~1.35 GB checkpoint retries: 3 volumes: f5_models: