FROM python:3.11-slim WORKDIR /app # System deps for Playwright + document libs RUN apt-get update && apt-get install -y \ wget gnupg libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 \ libgdk-pixbuf2.0-0 libgtk-3-0 libgbm1 libnss3 libxss1 \ libasound2 fonts-liberation libappindicator3-1 \ libdrm2 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \ libxtst6 lsb-release xdg-utils \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Install Chromium for Playwright RUN playwright install chromium RUN playwright install-deps chromium COPY . . ENV PORT=7860 EXPOSE 7860 CMD ["python", "app.py"]