Spaces:
Sleeping
Sleeping
FROM python:3.9-slim | |
# Configurar directorio de trabajo | |
WORKDIR /app | |
# Instalar dependencias del sistema | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
gnupg \ | |
curl \ | |
unzip \ | |
xvfb \ | |
libxi6 \ | |
libgconf-2-4 \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Instalar Google Chrome | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \ | |
&& apt-get update \ | |
&& apt-get install -y google-chrome-stable \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Copiar archivos del proyecto | |
COPY . /app/ | |
# Instalar dependencias de Python | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Configurar variables de entorno | |
ENV PYTHONUNBUFFERED=1 \ | |
PORT=7860 \ | |
CHROME_DRIVER_PATH=/usr/bin/chromedriver | |
# Exponer puerto | |
EXPOSE 7860 | |
# Comando para iniciar la aplicación | |
CMD ["python", "app.py"] |