Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # Create user and set up environment | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user | |
| WORKDIR $HOME/app | |
| # Install system dependencies as root | |
| USER root | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install streamlit explicitly first, then other requirements | |
| RUN pip install streamlit | |
| COPY requirements.txt ./ | |
| RUN pip install -r requirements.txt | |
| # Copy app code | |
| COPY --chown=user . . | |
| # Expose the Streamlit port | |
| EXPOSE 8501 | |
| # Run Streamlit app | |
| ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"] | |