mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-31 21:59:28 +00:00

Tested with rocm 6.3.1. Known issues with this commit: * The generated docker image becomes quite big * Suppressed MIOPEN warnings, which might not be a good idea * No windows support, at least not tested * Incomplete documentation * Not thoroughly tested
44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
name: kokoro-tts
|
|
services:
|
|
kokoro-tts:
|
|
# image: ghcr.io/remsky/kokoro-fastapi-rocm:v0.1.0
|
|
build:
|
|
context: ../..
|
|
dockerfile: docker/rocm/Dockerfile
|
|
volumes:
|
|
- ../../api/src:/app/api/src # Mount src for development
|
|
- ../../api/src/voices:/app/api/src/voices # Mount voices for persistence
|
|
ports:
|
|
- "8880:8880"
|
|
environment:
|
|
- PYTHONPATH=/app:/app/models
|
|
- TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1
|
|
# This suppresses excessive warning logs. Probably not a good idea to suppress, but no other solution found
|
|
# (see https://github.com/ROCm/MIOpen/issues/2981)
|
|
- MIOPEN_LOG_LEVEL=3
|
|
devices:
|
|
- /dev/kfd:/dev/kfd
|
|
- /dev/dri:/dev/dri
|
|
security_opt:
|
|
- seccomp=unconfined
|
|
group_add:
|
|
- video
|
|
ipc: host
|
|
|
|
# Gradio UI service
|
|
gradio-ui:
|
|
image: ghcr.io/remsky/kokoro-fastapi-ui:v0.1.0
|
|
# Uncomment below to build from source instead of using the released image
|
|
# build:
|
|
# context: ../../ui
|
|
ports:
|
|
- "7860:7860"
|
|
volumes:
|
|
- ../../ui/data:/app/ui/data
|
|
- ../../ui/app.py:/app/app.py # Mount app.py for hot reload
|
|
environment:
|
|
- GRADIO_WATCH=1 # Enable hot reloading
|
|
- PYTHONUNBUFFERED=1 # Ensure Python output is not buffered
|
|
- DISABLE_LOCAL_SAVING=false # Set to 'true' to disable local saving and hide file view
|
|
- API_HOST=kokoro-tts # Set TTS service URL
|
|
- API_PORT=8880 # Set TTS service PORT
|