Spaces:
Sleeping
Sleeping
Download Dockerfile from saidchrf/kokoro-api: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/saidchrf/kokoro-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/saidchrf/kokoro-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/saidchrf/kokoro-api/resolve/main/Dockerfile
580 Bytes
| FROM python:3.10-slim | |
| # 1. Installer espeak-ng (Obligatoire pour Kokoro) et git | |
| RUN apt-get update && apt-get install -y \ | |
| espeak-ng \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Créer le dossier de travail | |
| WORKDIR /app | |
| # 3. Copier les requirements et installer | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 4. Copier le code | |
| COPY . . | |
| # 5. Créer un dossier pour les modèles | |
| RUN mkdir -p models | |
| # 6. Lancer l'API sur le port 7860 (Port par défaut de Hugging Face) | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |