52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
services:
|
|
whisper-api:
|
|
build:
|
|
context: ./api
|
|
dockerfile: Dockerfile
|
|
container_name: whisper-api
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
- MODEL_SIZE=${MODEL_SIZE:-turbo}
|
|
- DEVICE=${DEVICE:-cuda}
|
|
- HSA_OVERRIDE_GFX_VERSION=${HSA_OVERRIDE_GFX_VERSION:-10.3.0}
|
|
- ROCM_VISIBLE_DEVICES=${ROCM_VISIBLE_DEVICES:-0}
|
|
volumes:
|
|
- whisper-cache:/root/.cache/whisper
|
|
devices:
|
|
- /dev/kfd:/dev/kfd
|
|
- /dev/dri:/dev/dri
|
|
# Настройки для GPU
|
|
shm_size: '10gb'
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
group_add:
|
|
- video
|
|
- render
|
|
security_opt:
|
|
- seccomp:unconfined
|
|
|
|
gradio-ui:
|
|
build:
|
|
context: ./ui
|
|
dockerfile: Dockerfile
|
|
container_name: gradio-ui
|
|
ports:
|
|
- "7860:7860"
|
|
environment:
|
|
- WHISPER_API_URL=${WHISPER_API_URL:-http://whisper-api:8080/transcribe}
|
|
- DB_RETENTION_HOURS=${DB_RETENTION_HOURS:-6}
|
|
volumes:
|
|
- ./ui/db:/app/db
|
|
depends_on:
|
|
whisper-api:
|
|
condition: service_healthy
|
|
restart: always
|
|
|
|
volumes:
|
|
whisper-cache:
|