Spaces:
Runtime error
Runtime error
| # ============================ | |
| # Base Image | |
| # ============================ | |
| FROM python:3.12-slim | |
| # ============================ | |
| # Working directory | |
| # ============================ | |
| WORKDIR /app | |
| # ============================ | |
| # System dependencies | |
| # ============================ | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ============================ | |
| # Copy dependency metadata | |
| # ============================ | |
| COPY pyproject.toml uv.lock ./ | |
| # ============================ | |
| # Install third-party dependencies ONLY | |
| # (no project installation) | |
| # ============================ | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ============================ | |
| # Copy source code | |
| # ============================ | |
| COPY src/ ./src/ | |
| COPY app/ ./app/ | |
| # ============================ | |
| # Make src discoverable | |
| # ============================ | |
| ENV PYTHONPATH=/app/src | |
| # ============================ | |
| # Expose Streamlit port | |
| # ============================ | |
| EXPOSE 8501 | |
| # ============================ | |
| # Health check | |
| # ============================ | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health | |
| # ============================ | |
| # Run the demo | |
| # ============================ | |
| ENTRYPOINT ["python", "app/run_demo.py"] | |