2025-01-14 00:38:44 -07:00
|
|
|
name: kokoro-tts
|
2024-12-31 04:51:21 -07:00
|
|
|
services:
|
|
|
|
kokoro-tts:
|
2025-01-12 06:13:35 -07:00
|
|
|
# image: ghcr.io/remsky/kokoro-fastapi-cpu:latest
|
2025-01-10 22:03:16 -07:00
|
|
|
# Uncomment below (and comment out above) to build from source instead of using the released image
|
2025-01-11 20:00:34 -07:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: docker/cpu/Dockerfile
|
2024-12-31 04:51:21 -07:00
|
|
|
volumes:
|
2025-01-11 20:00:34 -07:00
|
|
|
- ../../api/src:/app/api/src
|
|
|
|
- ../../Kokoro-82M:/app/Kokoro-82M
|
2024-12-31 04:51:21 -07:00
|
|
|
ports:
|
|
|
|
- "8880:8880"
|
|
|
|
environment:
|
|
|
|
- PYTHONPATH=/app:/app/Kokoro-82M
|
2025-01-04 02:14:46 -07:00
|
|
|
# ONNX Optimization Settings for vectorized operations
|
|
|
|
- ONNX_NUM_THREADS=8 # Maximize core usage for vectorized ops
|
|
|
|
- ONNX_INTER_OP_THREADS=4 # Higher inter-op for parallel matrix operations
|
|
|
|
- ONNX_EXECUTION_MODE=parallel
|
|
|
|
- ONNX_OPTIMIZATION_LEVEL=all
|
|
|
|
- ONNX_MEMORY_PATTERN=true
|
|
|
|
- ONNX_ARENA_EXTEND_STRATEGY=kNextPowerOfTwo
|
2025-01-06 03:32:41 -07:00
|
|
|
|
2025-01-13 19:31:44 -07:00
|
|
|
# Gradio UI service [Comment out everything below if you don't need it]
|
|
|
|
gradio-ui:
|
|
|
|
# image: ghcr.io/remsky/kokoro-fastapi:latest-ui
|
|
|
|
# Uncomment below (and comment out above) to build from source instead of using the released image
|
2025-01-13 23:48:13 -07:00
|
|
|
build:
|
|
|
|
context: ../../ui
|
2025-01-13 19:31:44 -07:00
|
|
|
ports:
|
|
|
|
- "7860:7860"
|
|
|
|
volumes:
|
2025-01-13 23:48:13 -07:00
|
|
|
- ../../ui/data:/app/ui/data
|
|
|
|
- ../../ui/app.py:/app/app.py # Mount app.py for hot reload
|
2025-01-13 19:31:44 -07:00
|
|
|
environment:
|
|
|
|
- GRADIO_WATCH=True # Enable hot reloading
|
|
|
|
- PYTHONUNBUFFERED=1 # Ensure Python output is not buffered
|