Spaces:
Runtime error
Runtime error
# Dockerfile | |
FROM python:3.9 | |
# Install necessary dependencies | |
RUN apt-get update && \ | |
apt-get install -y wget gnupg curl && \ | |
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-chrome.list && \ | |
apt-get update && \ | |
apt-get install -y google-chrome-stable \ | |
fonts-liberation \ | |
libasound2 \ | |
libatk-bridge2.0-0 \ | |
libatk1.0-0 \ | |
libatspi2.0-0 \ | |
libcups2 \ | |
libdbus-1-3 \ | |
libdrm2 \ | |
libgbm1 \ | |
libgtk-3-0 \ | |
libnspr4 \ | |
libnss3 \ | |
libu2f-udev \ | |
libvulkan1 \ | |
libxcomposite1 \ | |
libxdamage1 \ | |
libxfixes3 \ | |
libxkbcommon0 \ | |
libxrandr2 \ | |
xdg-utils | |
# Set the working directory | |
WORKDIR /code | |
# Copy the application code | |
COPY . . | |
# Set permissions | |
RUN chmod -R 777 . | |
# Install Python dependencies | |
RUN pip install -r requirements.txt | |
# Install chromedriver | |
RUN pip install seleniumbase | |
RUN chmod -R 777 /code /usr/local/lib/python3.9/site-packages/seleniumbase | |
RUN seleniumbase install chromedriver | |
# CMD to run the application | |
CMD ["python", "main.py"] | |