FROM python:3.11-slim RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 WORKDIR $HOME/app COPY --chown=user requirements-space.txt ./ RUN pip install --no-cache-dir --upgrade pip \ && pip install --no-cache-dir -r requirements-space.txt COPY --chown=user app.py ./ COPY --chown=user .streamlit ./.streamlit COPY --chown=user src ./src EXPOSE 7860 CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860", "--server.enableXsrfProtection=false"]