Download Dockerfile from Shads229/Zenith-AI: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/Shads229/Zenith-AI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Shads229/Zenith-AI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Shads229/Zenith-AI/resolve/main/Dockerfile
1.22 kB
| # Utiliser une image Python légère | |
| FROM python:3.10-slim | |
| # Éviter les fichiers .pyc et activer le mode non-interactif | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| DEBIAN_FRONTEND=noninteractive | |
| # Installer les dépendances système pour OpenCV, FFmpeg et l'audio | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| ffmpeg \ | |
| gcc \ | |
| python3-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Créer un utilisateur pour Hugging Face | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copier et installer les dépendances Python | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copier l'intégralité du code (backend, engine, app.py, .env) | |
| COPY --chown=user . . | |
| # Créer les dossiers de données nécessaires | |
| RUN mkdir -p video_analysis_pro/output video_analysis_pro/cache video_analysis_pro/reports | |
| # Exposer le port par défaut | |
| EXPOSE 7860 | |
| # Démarrer l'application via le point d'entrée app.py | |
| CMD ["python", "app.py"] | |