File size: 856 Bytes
df4c3f5 430e6f6 b27044a 9e8802d 41bffc0 9e8802d 7f90189 430e6f6 41bffc0 430e6f6 9e8802d b27044a 2a25392 b27044a 430e6f6 b27044a 430e6f6 7f90189 430e6f6 9e8802d 430e6f6 7f90189 430e6f6 7f90189 | 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 33 34 | FROM python:3.12-slim
WORKDIR /app
ENV HOME=/app
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV PYTHONUNBUFFERED=1
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_PORT=7860
ENV STREAMLIT_SERVER_ENABLE_CORS=false
ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
RUN mkdir -p /app/.streamlit && \
chmod -R 777 /app/.streamlit
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY src/ ./src/
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl --fail http://localhost:7860/_stcore/health || exit 1
CMD ["streamlit", "run", "src/streamlit_app.py"] |