mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
ci: update CI configuration to run tests only for API and enhance README with Docker usage instructions
This commit is contained in:
parent
832955ca1d
commit
2649a0ba0c
4 changed files with 19 additions and 2 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -29,4 +29,4 @@ jobs:
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
uv run pytest api/tests/ ui/tests/ --asyncio-mode=auto --cov=api --cov=ui --cov-report=term-missing
|
uv run pytest api/tests/ --asyncio-mode=auto --cov=api --cov-report=term-missing
|
||||||
|
|
17
README.md
17
README.md
|
@ -25,13 +25,28 @@ The service can be accessed through either the API endpoints or the Gradio web i
|
||||||
|
|
||||||
1. Install prerequisites:
|
1. Install prerequisites:
|
||||||
- Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) + [Git](https://git-scm.com/downloads)
|
- Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) + [Git](https://git-scm.com/downloads)
|
||||||
- Clone and start the service:
|
- Clone the repository:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/remsky/Kokoro-FastAPI.git
|
git clone https://github.com/remsky/Kokoro-FastAPI.git
|
||||||
cd Kokoro-FastAPI
|
cd Kokoro-FastAPI
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Start the service:
|
||||||
|
|
||||||
|
a. Using Docker Compose (recommended for full setup including UI):
|
||||||
|
```bash
|
||||||
docker compose up --build # for GPU
|
docker compose up --build # for GPU
|
||||||
#docker compose -f docker-compose.cpu.yml up --build # for CPU
|
#docker compose -f docker-compose.cpu.yml up --build # for CPU
|
||||||
```
|
```
|
||||||
|
|
||||||
|
b. Running the API alone using Docker:
|
||||||
|
```bash
|
||||||
|
# For CPU version
|
||||||
|
docker run -p 8880:8880 kokoro-fastapi-cpu
|
||||||
|
|
||||||
|
# For GPU version (requires NVIDIA Container Toolkit)
|
||||||
|
docker run --gpus all -p 8880:8880 kokoro-fastapi-gpu
|
||||||
|
```
|
||||||
2. Run locally as an OpenAI-Compatible Speech Endpoint
|
2. Run locally as an OpenAI-Compatible Speech Endpoint
|
||||||
```python
|
```python
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
name: kokoro-tts
|
||||||
services:
|
services:
|
||||||
kokoro-tts:
|
kokoro-tts:
|
||||||
# image: ghcr.io/remsky/kokoro-fastapi-cpu:latest
|
# image: ghcr.io/remsky/kokoro-fastapi-cpu:latest
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
name: kokoro-tts
|
||||||
services:
|
services:
|
||||||
kokoro-tts:
|
kokoro-tts:
|
||||||
build:
|
build:
|
||||||
|
|
Loading…
Add table
Reference in a new issue