| |
| |
| FROM python:3.12-slim AS builder |
|
|
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| gcc \ |
| g++ \ |
| libpq-dev \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /build |
|
|
| |
| COPY pyproject.toml ./ |
| COPY src/ ./src/ |
| COPY tasks/ ./tasks/ |
|
|
| |
| RUN pip install --no-cache-dir --user . |
|
|
| |
| FROM python:3.12-slim |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| ca-certificates \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| libpq5 \ |
| postgresql-client \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| git \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| libnss3 \ |
| libnspr4 \ |
| libatk1.0-0 \ |
| libatk-bridge2.0-0 \ |
| libcups2 \ |
| libdrm2 \ |
| libxkbcommon0 \ |
| libatspi2.0-0 \ |
| libx11-6 \ |
| libxcomposite1 \ |
| libxdamage1 \ |
| libxfixes3 \ |
| libxrandr2 \ |
| libgbm1 \ |
| libxcb1 \ |
| libpango-1.0-0 \ |
| libcairo2 \ |
| libasound2 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN apt-get update && \ |
| apt-get install -y --no-install-recommends curl wget unzip && \ |
| curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ |
| apt-get install -y --no-install-recommends nodejs && \ |
| apt-get autoremove -y && \ |
| rm -rf /var/lib/apt/lists/* |
| |
| |
| RUN pip install --no-cache-dir pipx && \ |
| pipx ensurepath |
| |
| |
| COPY --from=builder /root/.local /root/.local |
| |
| |
| RUN python3 -m playwright install chromium && \ |
| npx -y playwright install chromium |
| |
| |
| RUN pipx install postgres-mcp |
| |
| |
| WORKDIR /app |
| |
| |
| RUN mkdir -p /app/results |
| |
| |
| COPY . . |
| |
| |
| ENV PATH="/root/.local/bin:/root/.local/pipx/venvs/*/bin:${PATH}" |
| ENV PYTHONPATH="/app" |
| ENV PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright |
| ENV PIPX_HOME=/root/.local/pipx |
| ENV PIPX_BIN_DIR=/root/.local/bin |
| |
| |
| CMD ["python3", "-m", "pipeline", "--help"] |