This commit is contained in:
2026-02-25 23:48:01 +03:00
commit 6c4cf7ba2f
9 changed files with 894 additions and 0 deletions

51
docker-compose.yml Normal file
View File

@@ -0,0 +1,51 @@
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: