Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /code | |
| COPY requirements.txt /code/ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . /code/ | |
| # Streamlit must run on 8080 for HuggingFace Docker Spaces | |
| EXPOSE 8080 | |
| ENV PORT=8080 | |
| ENV STREAMLIT_SERVER_HEADLESS=true | |
| ENV STREAMLIT_SERVER_PORT=8080 | |
| ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 | |
| # Healthcheck now checks the correct port | |
| HEALTHCHECK CMD curl --fail http://localhost:8080/_stcore/health || exit 1 | |
| CMD ["streamlit", "run", "src/app.py", "--server.port=8080", "--server.address=0.0.0.0"] | |