Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV MPLBACKEND=Agg | |
| ENV STREAMLIT_SERVER_PORT=8501 | |
| ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 | |
| ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt ./requirements.txt | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # App code | |
| COPY src/ ./src/ | |
| # Prompts por defecto | |
| COPY prompts_por_defecto/ ./evaluacion_por_defecto/prompts_por_defecto/ | |
| # Plantilla JSON por defecto para metadata de sesgos/contextos/escenarios/comunidades | |
| COPY plantillas_evaluacion_por_defecto/ ./evaluacion_por_defecto/plantillas_evaluacion_por_defecto/ | |
| EXPOSE 8501 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ | |
| CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"] |