Spaces:
Runtime error
Runtime error
File size: 1,070 Bytes
4792c29 f0de5d8 3a6cbfa a6aa3fe 4792c29 a6aa3fe e2d5c54 a6aa3fe 3a6cbfa 193251b e2d5c54 7d567a8 e2d5c54 7d567a8 e2d5c54 3a6cbfa a6aa3fe ad64e4f 4792c29 | 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 | # Dockerfile — minimal, validated, uses python:3.11-slim and a single-line CMD
FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
STREAMLIT_SERVER_HEADLESS=true \
STREAMLIT_SERVER_RUN_ON_SAVE=false \
STREAMLIT_SERVER_ENABLECORS=false \
STREAMLIT_SERVER_PORT=8501 \
STREAMLIT_SERVER_ADDRESS=0.0.0.0
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 ca-certificates && rm -rf /var/lib/apt/lists/*
COPY . /app
RUN python -m pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
RUN cp -r /app/* $HOME/app/ || true
EXPOSE 8501
# Single-line JSON array CMD — avoids Dockerfile parse pitfalls
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true", "--server.runOnSave=false", "--server.enableCORS=false", "--server.enableXsrfProtection=false", "--logger.level=debug"]
|