| |
| FROM python:3.10-slim |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| git ca-certificates \ |
| libnss3 libatk-bridge2.0-0 libgtk-3-0 libdrm2 libxdamage1 libatspi2.0-0 \ |
| libxcomposite1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 \ |
| libasound2 libxshmfence1 libxkbcommon0 fonts-liberation \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -U pip && \ |
| pip install --no-cache-dir -r requirements.txt |
|
|
| |
| |
| RUN python -m playwright install --with-deps chromium |
|
|
| |
| COPY . /app |
|
|
| |
| ENV PORT=7860 |
| |
| ENV PLAYWRIGHT_BROWSERS_PATH=0 |
|
|
| |
| CMD ["python", "app.py"] |