Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # System deps (minimal) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python deps first for better caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app source (make sure these paths exist in your repo) | |
| COPY app.py ./app.py | |
| COPY src/ ./src/ | |
| COPY data/ ./data/ | |
| COPY .streamlit/ ./.streamlit/ | |
| COPY README.md ./README.md | |
| # Streamlit defaults | |
| ENV STREAMLIT_SERVER_HEADLESS=true | |
| EXPOSE 8501 | |
| # Healthcheck for Streamlit | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| # Run the Streamlit app (root-level app.py) | |
| ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |