Spaces:
Sleeping
Sleeping
Download Dockerfile from Eric2mangel/Feature_selection: direct link, hf CLI and curl.
- Browser
- Download file 921 Bytes
-
https://huggingface.co/spaces/Eric2mangel/Feature_selection/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Eric2mangel/Feature_selection/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Eric2mangel/Feature_selection/resolve/main/Dockerfile
921 Bytes
| # syntax = docker/dockerfile:1.4 | |
| FROM python:3.12-slim | |
| # Installe les dépendances système nécessaires | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| g++ \ | |
| libjpeg62-turbo-dev \ | |
| zlib1g-dev \ | |
| libpng-dev \ | |
| libfreetype6-dev \ | |
| libopenjp2-7-dev \ | |
| libtiff5-dev \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Copie requirements en premier (meilleur cache) | |
| COPY requirements.txt . | |
| # Installe tout (sans cache pour réduire la taille finale) | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copie le code | |
| COPY app.py . | |
| # Port + commande obligatoire pour HF Spaces | |
| EXPOSE 8501 | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"] |