Spaces:
Runtime error
Runtime error
File size: 1,050 Bytes
1cbfe64 08ebe5a efcbdb4 1cbfe64 5474716 48fa359 1cbfe64 48fa359 1cbfe64 efcbdb4 1cbfe64 d8a91f1 1cbfe64 fed8203 1cbfe64 fed8203 1cbfe64 fed8203 1cbfe64 fed8203 1cbfe64 6af48d6 1cbfe64 | 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 35 36 37 38 39 40 41 42 43 | # ===== Base Image =====
FROM python:3.13.5-slim
# ===== Working Directory =====
WORKDIR /app
# ===== System dependencies =====
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# ===== Copy project files =====
COPY requirements.txt ./
COPY src/ ./src/
# ===== Install Python dependencies =====
RUN pip install --no-cache-dir -r requirements.txt
# ===== Create Streamlit config folder with permissions =====
RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit
# ===== Add minimal Streamlit config =====
RUN echo "\
[server]\n\
headless = true\n\
port = 8501\n\
enableCORS = false\n\
enableXsrfProtection = false\n\
\n\
[browser]\n\
gatherUsageStats = false\n\
" > /app/.streamlit/config.toml
# ===== Expose port =====
EXPOSE 8501
# ===== Healthcheck =====
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# ===== Entrypoint =====
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"] |