Files
whisper-api/docker-compose.yml

45 lines
1.1 KiB
YAML

version: '3.8'
services:
whisper-api:
build:
context: .
dockerfile: docker/Dockerfile
container_name: whisper-api
restart: unless-stopped
ports:
- "${PORT:-8000}:8000"
environment:
- PORT=8000
- HOST=0.0.0.0
- WHISPER_MODEL=${WHISPER_MODEL:-large-v3}
- WHISPER_DEVICE=${WHISPER_DEVICE:-cuda}
- WHISPER_COMPUTE_TYPE=${WHISPER_COMPUTE_TYPE:-float16}
- API_KEYS=${API_KEYS}
- ADMIN_USER=${ADMIN_USER:-admin}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:--whisper12510-}
- LOG_RETENTION_DAYS=${LOG_RETENTION_DAYS:-30}
- DATABASE_URL=sqlite:////app/data/whisper_api.db
volumes:
- whisper_models:/app/models
- whisper_data:/app/data
- whisper_uploads:/app/uploads
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
whisper_models:
whisper_data:
whisper_uploads: