Download Dockerfile from Muyumba/james-AI: direct link, hf CLI and curl.
- Browser
- Download file 910 Bytes
-
https://huggingface.co/spaces/Muyumba/james-AI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Muyumba/james-AI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Muyumba/james-AI/resolve/main/Dockerfile
910 Bytes
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # Installer dépendances système pour Pillow et compilation éventuelle | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| libjpeg-dev \ | |
| zlib1g-dev \ | |
| libpng-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copier requirements et code | |
| COPY requirements.txt ./ | |
| COPY src/ ./src/ | |
| # Mettre à jour pip et installer les dépendances Python | |
| RUN python -m pip install --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Créer un dossier cache Hugging Face accessible | |
| RUN mkdir -p /app/.cache | |
| # Créer un utilisateur non-root pour éviter les problèmes de permission | |
| RUN useradd -ms /bin/bash appuser | |
| RUN chown -R appuser:appuser /app | |
| USER appuser | |
| # Exposer le port Streamlit | |
| EXPOSE 8501 | |
| # Lancer l'application | |
| ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |