Add OpenAI-compatible API and Docker deployment

- Add FastAPI-based API in whisperx/api/
- Implement transcription endpoint compatible with OpenAI
- Added Dockerfile and docker-compose.yml for easy deployment
- Updated README with Docker instructions
- Added new script whisperx-serve for running the API
This commit is contained in:
2026-05-13 01:37:47 +03:00
parent d154f4b39b
commit c1fcb3f57c
8 changed files with 238 additions and 1 deletions

28
docker-compose.yml Normal file
View File

@@ -0,0 +1,28 @@
version: '3.8'
services:
whisperx-api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- WHISPERX_MODEL=turbo
- WHISPERX_DEVICE=cuda
- WHISPERX_COMPUTE_TYPE=float16
volumes:
# Mount Hugging Face cache if needed
- hf_cache:/app/.cache/huggingface
devices:
# Allow access to all GPUs
- /dev/kfd:/dev/kfd
- /dev/dri:/dev/dri
cap_add:
- SYS_ADMIN
security_opt:
- seccomp:unconfined
# For AMD ROCm GPUs, use device passthrough
volumes:
hf_cache: