Skip to content

Commit 47edccd

Browse files
committed
docs(unraid): unify paths and consolidate template
1 parent dad5a14 commit 47edccd

7 files changed

Lines changed: 293 additions & 106 deletions

File tree

README.md

Lines changed: 242 additions & 58 deletions
Large diffs are not rendered by default.

assets/unraid-icon.png

3.83 MB
Loading

docker/unraid/stack.cpu.image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ services:
77
labels:
88
net.unraid.docker.icon: https://raw.githubusercontent.com/hsiang-han/Kokoro-FastAPI-v1.1_zh/master/assets/unraid-icon.png
99
volumes:
10-
- /mnt/user/appdata/kokoro-fastapi-v1_1_zh/models:/app/api/src/models
11-
- /mnt/user/appdata/kokoro-fastapi-v1_1_zh/voices:/app/api/src/voices
10+
- /mnt/user/appdata/kokoro-fastapi-zh/models:/app/api/src/models
11+
- /mnt/user/appdata/kokoro-fastapi-zh/voices:/app/api/src/voices
1212
ports:
1313
- "8880:8880"
1414
environment:

docker/unraid/stack.gpu.image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ services:
77
labels:
88
net.unraid.docker.icon: https://raw.githubusercontent.com/hsiang-han/Kokoro-FastAPI-v1.1_zh/master/assets/unraid-icon.png
99
volumes:
10-
- /mnt/user/appdata/kokoro-fastapi-v1_1_zh/models:/app/api/src/models
11-
- /mnt/user/appdata/kokoro-fastapi-v1_1_zh/voices:/app/api/src/voices
10+
- /mnt/user/appdata/kokoro-fastapi-zh/models:/app/api/src/models
11+
- /mnt/user/appdata/kokoro-fastapi-zh/voices:/app/api/src/voices
1212
ports:
1313
- "8880:8880"
1414
environment:

docs/deployment/unraid-and-prebuilt-images.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
```env
3636
KOKORO_IMAGE=ghcr.io/hsiang-han/kokoro-fastapi-v1.1_zh-gpu:v1.1.0
3737
KOKORO_PORT=8880
38-
KOKORO_MODELS_PATH=/mnt/user/appdata/kokoro-fastapi-v1_1_zh/models
39-
KOKORO_VOICES_PATH=/mnt/user/appdata/kokoro-fastapi-v1_1_zh/voices
40-
KOKORO_OUTPUT_PATH=/mnt/user/appdata/kokoro-fastapi-v1_1_zh/output
38+
KOKORO_MODELS_PATH=/mnt/user/appdata/kokoro-fastapi-zh/models
39+
KOKORO_VOICES_PATH=/mnt/user/appdata/kokoro-fastapi-zh/voices
4140
DEFAULT_VOICE=zf_094
4241
DEFAULT_VOICE_CODE=z
4342
```

unraid/templates/kokoro-fastapi-gpu.xml

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0"?>
2+
<Container version="2">
3+
<Name>Kokoro-FastAPI-zh</Name>
4+
<Repository>ghcr.io/hsiang-han/kokoro-fastapi-v1.1_zh-cpu:latest</Repository>
5+
<Registry>https://ghcr.io</Registry>
6+
<Network>bridge</Network>
7+
<MyIP/>
8+
<Shell>bash</Shell>
9+
<Privileged>false</Privileged>
10+
<Support>https://github.com/hsiang-han/Kokoro-FastAPI-v1.1_zh/issues</Support>
11+
<Project>https://github.com/hsiang-han/Kokoro-FastAPI-v1.1_zh</Project>
12+
<Overview>OpenAI-compatible TTS API based on Kokoro-82M-v1.1-zh. Default uses CPU image. For GPU: change Repository to ghcr.io/hsiang-han/kokoro-fastapi-v1.1_zh-gpu:latest, set USE_GPU=true, and add Extra Parameters: --gpus=all --runtime=nvidia (do not set as default on CPU hosts).</Overview>
13+
<Category>Network:Web Network:Other</Category>
14+
<WebUI>http://[IP]:[PORT:8880]/web</WebUI>
15+
<TemplateURL>https://raw.githubusercontent.com/hsiang-han/Kokoro-FastAPI-v1.1_zh/master/unraid/templates/kokoro-fastapi-zh.xml</TemplateURL>
16+
<Icon>https://raw.githubusercontent.com/hsiang-han/Kokoro-FastAPI-v1.1_zh/master/assets/unraid-icon.png</Icon>
17+
18+
<Config Name="WebUI Port" Target="8880" Default="8880" Mode="tcp" Description="Web/API exposed port" Type="Port" Display="always" Required="true" Mask="false">8880</Config>
19+
20+
<Config Name="Models Path" Target="/app/api/src/models" Default="/mnt/user/appdata/kokoro-fastapi-zh/models" Mode="rw" Description="Host path for model files" Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/kokoro-fastapi-zh/models</Config>
21+
22+
<Config Name="Voices Path" Target="/app/api/src/voices" Default="/mnt/user/appdata/kokoro-fastapi-zh/voices" Mode="rw" Description="Host path for voice .pt files" Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/kokoro-fastapi-zh/voices</Config>
23+
24+
<Config Name="Python Path" Target="PYTHONPATH" Default="/app:/app/api" Mode="" Description="Python import path" Type="Variable" Display="advanced" Required="false" Mask="false">/app:/app/api</Config>
25+
26+
<Config Name="Python Unbuffered" Target="PYTHONUNBUFFERED" Default="1" Mode="" Description="Enable unbuffered Python logs" Type="Variable" Display="advanced" Required="false" Mask="false">1</Config>
27+
28+
<Config Name="Repo ID" Target="REPO_ID" Default="hexgrad/Kokoro-82M-v1.1-zh" Mode="" Description="HuggingFace model repo" Type="Variable" Display="advanced" Required="true" Mask="false">hexgrad/Kokoro-82M-v1.1-zh</Config>
29+
30+
<Config Name="Default Voice" Target="DEFAULT_VOICE" Default="zf_001" Mode="" Description="Default voice name" Type="Variable" Display="always" Required="true" Mask="false">zf_094</Config>
31+
32+
<Config Name="Default Voice Code" Target="DEFAULT_VOICE_CODE" Default="z" Mode="" Description="Optional language code override. Set z to force zh pipeline." Type="Variable" Display="advanced" Required="false" Mask="false">z</Config>
33+
34+
<Config Name="Model File" Target="KOKORO_V1_FILE" Default="v1_1_zh/kokoro-v1_1-zh.pth" Mode="" Description="Model path relative to /app/api/src/models" Type="Variable" Display="advanced" Required="true" Mask="false">v1_1_zh/kokoro-v1_1-zh.pth</Config>
35+
36+
<Config Name="Voices Dir" Target="VOICES_DIR" Default="/app/api/src/voices/v1_1_zh" Mode="" Description="Voice directory in container" Type="Variable" Display="advanced" Required="true" Mask="false">/app/api/src/voices/v1_1_zh</Config>
37+
38+
<Config Name="API Log Level" Target="API_LOG_LEVEL" Default="DEBUG" Mode="" Description="API logging level" Type="Variable" Display="advanced" Required="false" Mask="false">DEBUG</Config>
39+
40+
<Config Name="Use GPU" Target="USE_GPU" Default="false" Mode="" Description="CPU default=false. For NVIDIA GPU set true and switch Repository to *-gpu image." Type="Variable" Display="advanced" Required="true" Mask="false">false</Config>
41+
42+
<Config Name="NVIDIA Visible Devices" Target="NVIDIA_VISIBLE_DEVICES" Default="all" Mode="" Description="Only needed for GPU mode" Type="Variable" Display="advanced" Required="false" Mask="false">all</Config>
43+
44+
<Config Name="NVIDIA Driver Caps" Target="NVIDIA_DRIVER_CAPABILITIES" Default="compute,utility" Mode="" Description="Only needed for GPU mode" Type="Variable" Display="advanced" Required="false" Mask="false">compute,utility</Config>
45+
</Container>

0 commit comments

Comments
 (0)