Download Dockerfile from Shads229/VoxiAI: direct link, hf CLI and curl.
- Browser
- Download file 849 Bytes
-
https://huggingface.co/spaces/Shads229/VoxiAI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Shads229/VoxiAI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Shads229/VoxiAI/resolve/main/Dockerfile
849 Bytes
| FROM python:3.10-slim | |
| # Installation des dépendances système | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libass-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Création de l'utilisateur | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| WORKDIR /app | |
| # Installation des dépendances Python | |
| COPY --chown=user:user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Pré-téléchargement du modèle Whisper pour éviter les erreurs au runtime | |
| RUN python3 -c "from faster_whisper import WhisperModel; WhisperModel('base', device='cpu', compute_type='int8')" | |
| # Copie du code | |
| COPY --chown=user:user . . | |
| # Création des dossiers nécessaires | |
| RUN mkdir -p uploads outputs static | |
| # Port par défaut pour Hugging Face | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |