FROM python:3.10-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Set a writable path for Playwright browsers ENV PLAYWRIGHT_BROWSERS_PATH=/app/playwright-browsers # Install Playwright Chromium browser to the writable path RUN python -m playwright install --with-deps chromium COPY . . EXPOSE 7860 CMD ["python", "main.py"]