| FROM python:3.10-slim |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| wget \ |
| gnupg \ |
| unzip \ |
| curl \ |
| fonts-liberation \ |
| libasound2 \ |
| libatk-bridge2.0-0 \ |
| libatk1.0-0 \ |
| libcups2 \ |
| libdbus-1-3 \ |
| libdrm2 \ |
| libgbm1 \ |
| libgtk-3-0 \ |
| libnspr4 \ |
| libnss3 \ |
| libxcomposite1 \ |
| libxdamage1 \ |
| libxfixes3 \ |
| libxkbcommon0 \ |
| libxrandr2 \ |
| xdg-utils \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google.gpg \ |
| && 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 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
| RUN pip install flask requests |
| |
| RUN playwright install chromium |
|
|
| |
| COPY app.py . |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["python", "app.py"] |