Spaces:
Sleeping
Sleeping
| # Imagen base más completa que "slim" | |
| FROM python:3.10 | |
| # Instalar R y dependencias del sistema | |
| RUN apt-get update && apt-get install -y \ | |
| r-base \ | |
| libcurl4-openssl-dev \ | |
| libssl-dev \ | |
| libxml2-dev \ | |
| libfontconfig1 \ | |
| libfreetype6 \ | |
| libpng-dev \ | |
| libjpeg62-turbo-dev \ | |
| build-essential \ | |
| fonts-dejavu \ | |
| unzip \ | |
| wget \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Instalar paquetes de R necesarios | |
| RUN R -e "install.packages(c('ggplot2', 'dplyr', 'RColorBrewer'), repos='http://cran.rstudio.com/')" | |
| # Establecer directorio de trabajo | |
| WORKDIR /app | |
| # Copiar archivos del proyecto al contenedor | |
| COPY . . | |
| # Instalar dependencias de Python | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Exponer puerto típico de Gradio | |
| EXPOSE 7860 | |
| # Ejecutar la app | |
| CMD ["python", "app.py"] | |