# Hugging Face Space (Docker SDK) running the Streamlit app on port 7860. FROM python:3.12-slim # Run as the non-root user Hugging Face expects (uid 1000). RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR $HOME/app COPY --chown=user requirements.txt . RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt COPY --chown=user . . EXPOSE 7860 CMD ["streamlit", "run", "hsk4_ch18.py", \ "--server.port=7860", "--server.address=0.0.0.0", \ "--server.enableCORS=false", "--server.enableXsrfProtection=false"]