From bfe2dd522f5eef196973c2c95a0416bc314f17e4 Mon Sep 17 00:00:00 2001 From: remsky Date: Mon, 13 Jan 2025 05:51:47 -0700 Subject: [PATCH 1/3] Update README.md --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index 6a3b673..e6c96cf 100644 --- a/README.md +++ b/README.md @@ -317,6 +317,53 @@ with open("speech.wav", "wb") as f: See `examples/phoneme_examples/generate_phonemes.py` for a sample script. +## Known Issues + +
+Linux GPU Permissions + +Some Linux users may encounter GPU permission issues when running as non-root. +Can't guarantee anything, but here are some common solutions, consider your security requirements carefully + +### Option 1: Container Groups (Likely the best option) +```yaml +services: + kokoro-tts: + # ... existing config ... + group_add: + - "video" + - "render" +``` + +### Option 2: Host System Groups +```yaml +services: + kokoro-tts: + # ... existing config ... + user: "${UID}:${GID}" + group_add: + - "video" +``` +Note: May require adding host user to groups: `sudo usermod -aG docker,video $USER` and system restart. + +### Option 3: Device Permissions (Use with caution) +```yaml +services: + kokoro-tts: + # ... existing config ... + devices: + - /dev/nvidia0:/dev/nvidia0 + - /dev/nvidiactl:/dev/nvidiactl + - /dev/nvidia-uvm:/dev/nvidia-uvm +``` +⚠️ Warning: Reduces system security. Use only in development environments. + +Prerequisites: NVIDIA GPU, drivers, and container toolkit must be properly configured. + +Visit [NVIDIA Container Toolkit installation](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) for more detailed information + +
+ ## Model and License
From b261501d1f6f409d74610ecc949161ba2e7026da Mon Sep 17 00:00:00 2001 From: remsky Date: Mon, 13 Jan 2025 06:18:56 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e6c96cf..60b53bb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # Kokoro TTS API [![Tests](https://img.shields.io/badge/tests-117%20passed-darkgreen)]() [![Coverage](https://img.shields.io/badge/coverage-75%25-darkgreen)]() -[![Tested at Model Commit](https://img.shields.io/badge/last--tested--model--commit-a67f113-blue)](https://huggingface.co/hexgrad/Kokoro-82M/tree/c3b0d86e2a980e027ef71c28819ea02e351c2667) [![Try on Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Try%20on-Spaces-blue)](https://huggingface.co/spaces/Remsky/Kokoro-TTS-Zero) +[![Tested at Model Commit](https://img.shields.io/badge/last--tested--model--commit-a67f113-blue)](https://huggingface.co/hexgrad/Kokoro-82M/tree/c3b0d86e2a980e027ef71c28819ea02e351c2667) [![Try on Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Try%20on-Spaces-blue)](https://huggingface.co/spaces/Remsky/Kokoro-TTS-Zero) [![Buy Me A Coffee](https://img.shields.io/badge/BMC-✨☕-gray?style=flat-square)](https://www.buymeacoffee.com/remsky) Dockerized FastAPI wrapper for [Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M) text-to-speech model - OpenAI-compatible Speech endpoint, with inline voice combination functionality From 258b5fff543458c91b82cd3a3decb4b2d34e0ea3 Mon Sep 17 00:00:00 2001 From: remsky Date: Mon, 13 Jan 2025 06:27:22 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 60b53bb..fddea39 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,8 @@ The service can be accessed through either the API endpoints or the Gradio web i ```bash git clone https://github.com/remsky/Kokoro-FastAPI.git cd Kokoro-FastAPI - docker compose up --build + docker compose up --build # for GPU + #docker compose -f docker-compose.cpu.yml up --build # for CPU ``` 2. Run locally as an OpenAI-Compatible Speech Endpoint ```python