| FROM python:3.10-slim |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| curl \ |
| unzip \ |
| libnss3 \ |
| libnspr4 \ |
| libatk1.0-0 \ |
| libatk-bridge2.0-0 \ |
| libcups2 \ |
| libdrm2 \ |
| libxcomposite1 \ |
| libxdamage1 \ |
| libxfixes3 \ |
| libxrandr2 \ |
| libgbm1 \ |
| libasound2 \ |
| libpangocairo-1.0-0 \ |
| libxshmfence1 \ |
| libx11-xcb1 \ |
| libxkbcommon0 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
| COPY requirements.txt . |
|
|
| |
| RUN pip install --no-cache-dir -r requirements.txt && \ |
| playwright install chromium && \ |
| playwright install-deps chromium |
|
|
| RUN pip install httpx[socks] |
|
|
| COPY . . |
|
|
| |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|