Spaces:
Sleeping
Sleeping
# Dockerfile (minimal, robust) | |
FROM python:3.11-slim | |
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
# Use a small shell so we can unset the bad env var at runtime | |
SHELL ["/bin/bash", "-lc"] | |
# Fallback port if HF doesn't inject $PORT for some reason | |
ENV PORT=8501 | |
# 1) Unset STREAMLIT_SERVER_PORT so Streamlit won't choke on an empty value | |
# 2) Run Streamlit binding to the HF $PORT | |
CMD unset STREAMLIT_SERVER_PORT; exec streamlit run app.py --server.port=${PORT} --server.address=0.0.0.0 | |