AIdashboard / Dockerfile
enacimie's picture
Update Dockerfile
16489e6 verified
raw
history blame contribute delete
735 Bytes
FROM python:3.9-slim
# Crear directorio de trabajo
WORKDIR /app
# Instalar dependencias del sistema
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Copiar requirements.txt
COPY requirements.txt .
# Instalar dependencias de Python
RUN pip install --no-cache-dir -r requirements.txt
# Copiar c贸digo fuente
COPY src/ ./src/
# Crear usuario no-root (opcional pero recomendado)
RUN useradd -m appuser && chown -R appuser /app
USER appuser
# Puerto de Streamlit
EXPOSE 8501
# Healthcheck para HF Spaces
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# Ejecutar la aplicaci贸n
ENTRYPOINT ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]