Spaces:
Runtime error
Runtime error
# Use the official Python image as a base | |
FROM python:3.11-slim | |
# Install necessary libraries and dependencies for Playwright | |
RUN apt-get update && apt-get install -y \ | |
libgconf-2-4 \ | |
libnss3 \ | |
libx11-xcb1 \ | |
libxcomposite1 \ | |
libxdamage1 \ | |
libxrandr2 \ | |
libxss1 \ | |
libxtst6 \ | |
libgtk-3-0 \ | |
libatspi2.0-0 \ | |
libgdk-pixbuf2.0-0 \ | |
libpango-1.0-0 \ | |
libpangocairo-1.0-0 \ | |
libcups2 \ | |
libdbus-1-3 \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install Playwright and its dependencies | |
RUN pip install playwright | |
RUN playwright install | |
# Set up working directory | |
WORKDIR /app | |
# Copy application files | |
COPY . /app | |
# Run the application | |
CMD ["python", "app.py"] |