CoolFace
Apppublic

othmane107/ComputerVisionProject

sourceHugging Faceotherupdated 7mo agoView on Hugging Face
0likes
Dockerfile39 linesDownload Raw Back to root
1FROM python:3.13.5-slim2WORKDIR /app3 4# Installation des dépendances système5RUN apt-get update && apt-get install -y \6    build-essential \7    curl \8    git \9    libzbar0 \10    zbar-tools \11    libzbar-dev \12    libgl1-mesa-glx \13    libglib2.0-0 \14    && rm -rf /var/lib/apt/lists/*15 16# Copier les fichiers de dépendances17COPY requirements.txt ./18 19# Installer les dépendances Python20RUN pip3 install --no-cache-dir --upgrade pip && \21    pip3 install --no-cache-dir -r requirements.txt22 23# Créer le dossier de configuration Streamlit24RUN mkdir -p /root/.streamlit25 26# Copier la configuration Streamlit27COPY .streamlit/config.toml /root/.streamlit/config.toml28 29# Copier le dossier src30COPY src/ ./src/31 32# Exposer le port 8501 (standard Hugging Face)33EXPOSE 850134 35# Health check36HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 137 38# Démarrer l'application Streamlit39CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]