Spaces:
Sleeping
Sleeping
File size: 593 Bytes
0abc1cd 205365d 1628ac8 205365d 1628ac8 205365d 1628ac8 205365d 1628ac8 0abc1cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# 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
|