Spaces:
Sleeping
Sleeping
File size: 913 Bytes
ef138da 81bbd83 ef138da 81bbd83 dc02829 81bbd83 dc02829 81bbd83 ef138da 81bbd83 dc02829 81bbd83 ef138da 81bbd83 ef138da 81bbd83 ef138da 81bbd83 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
FROM python:3.9-slim
WORKDIR /app
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg libsm6 libxext6 libxrender-dev libgl1-mesa-glx fontconfig \
&& rm -rf /var/lib/apt/lists/*
# Cache dirs that must be writable
RUN mkdir -p /app/.cache/matplotlib /app/.cache/fontconfig
ENV MPLCONFIGDIR=/app/.cache/matplotlib \
FONTCONFIG_PATH=/app/.cache/fontconfig
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy code and Streamlit config
COPY src/ ./src/
COPY .streamlit/ ./.streamlit/
# Expose the port the Space will hit
EXPOSE 7860
# IMPORTANT: use the port env var Hugging Face injects
ENV PORT=7860
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", \
"--server.headless=true", \
"--server.port=7860", \
"--server.enableXsrfProtection=false", \
"--server.enableCORS=false"] |