Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # System deps (ffmpeg for video I/O) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| ENV HOME=/app | |
| # Leverage build cache for Python deps | |
| COPY requirements.txt . | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # App code | |
| COPY . . | |
| # Streamlit folder (if your app needs it) | |
| RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit | |
| EXPOSE 8501 | |
| HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ | |
| CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"] | |