Claude_UI-HF_4 / Dockerfile
rohitdiwane's picture
Update Dockerfile
1cbfe64 verified
# ===== 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"]