zyxciss commited on
Commit
7cb9cd7
·
verified ·
1 Parent(s): 32e9b92

Create docker-compose.yml

Browse files
Files changed (1) hide show
  1. docker-compose.yml +37 -0
docker-compose.yml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: kokoro-fastapi-cpu
2
+ services:
3
+ kokoro-tts:
4
+ build:
5
+ context: ../..
6
+ dockerfile: docker/cpu/Dockerfile
7
+ volumes:
8
+ - ../../api:/app/api
9
+ ports:
10
+ - "8880:8880"
11
+ environment:
12
+ - PYTHONPATH=/app:/app/api
13
+ # ONNX Optimization Settings for vectorized operations
14
+ - ONNX_NUM_THREADS=8 # Maximize core usage for vectorized ops
15
+ - ONNX_INTER_OP_THREADS=4 # Higher inter-op for parallel matrix operations
16
+ - ONNX_EXECUTION_MODE=parallel
17
+ - ONNX_OPTIMIZATION_LEVEL=all
18
+ - ONNX_MEMORY_PATTERN=true
19
+ - ONNX_ARENA_EXTEND_STRATEGY=kNextPowerOfTwo
20
+
21
+ # # Gradio UI service [Comment out everything below if you don't need it]
22
+ # gradio-ui:
23
+ # image: ghcr.io/remsky/kokoro-fastapi-ui:v0.2.0
24
+ # # Uncomment below (and comment out above) to build from source instead of using the released image
25
+ # build:
26
+ # context: ../../ui
27
+ # ports:
28
+ # - "7860:7860"
29
+ # volumes:
30
+ # - ../../ui/data:/app/ui/data
31
+ # - ../../ui/app.py:/app/app.py # Mount app.py for hot reload
32
+ # environment:
33
+ # - GRADIO_WATCH=True # Enable hot reloading
34
+ # - PYTHONUNBUFFERED=1 # Ensure Python output is not buffered
35
+ # - DISABLE_LOCAL_SAVING=false # Set to 'true' to disable local saving and hide file view
36
+ # - API_HOST=kokoro-tts # Set TTS service URL
37
+ # - API_PORT=8880 # Set TTS service PORT