diff --git a/cicd/Dockerfile b/cicd/Dockerfile index fec16a9..19acc78 100644 --- a/cicd/Dockerfile +++ b/cicd/Dockerfile @@ -1,5 +1,5 @@ # Create an image that will run personal benchmarks on Kaggle -FROM python:3.11-slim +FROM gcr.io/kaggle-images/python:v163 COPY --from=ghcr.io/astral-sh/uv:0.6.14 /uv /uvx /bin/ @@ -14,42 +14,12 @@ RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --frozen --no-install-project --no-dev --group kaggle -# Manually install Playwright's system dependencies for Debian Trixie. -# This step is necessary because the base image was recently updated to Debian -# Trixie, which changed the names and availability of several packages required -# by Playwright's browsers. -# -# This list of packages was obtained from the detailed error logs produced -# by Playwright when it failed to launch a browser. -RUN apt-get update && apt-get install -y \ - libnss3 libnss3-tools \ - libnspr4 \ - libdbus-1-3 \ - libatk1.0-0 \ - libatk-bridge2.0-0 \ - libcups2 \ - libdrm2 \ - libatspi2.0-0 \ - libxcomposite1 \ - libxdamage1 \ - libxfixes3 \ - libxrandr2 \ - libgbm1 \ - libpango-1.0-0 \ - libcairo2 \ - libasound2 \ - fonts-unifont \ - libxkbcommon0 \ - libglib2.0-0 \ - libgobject-2.0-0 \ - libexpat1 \ - libx11-6 \ - libxext6 \ - libxcb1 \ - libgtk-3-0 \ - libfontconfig1 \ - --no-install-recommends +# Install system dependencies for browsers automatically +RUN apt-get update && \ + uv run playwright install-deps chromium && \ + apt-get clean && rm -rf /var/lib/apt/lists/* +# Install the actual browser binaries RUN uv run playwright install chromium --only-shell COPY . /benchmarks diff --git a/pyproject.toml b/pyproject.toml index f07c636..8a12af6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,6 @@ dependencies = [ "tqdm", "python-dotenv>=1.0.1", "protobuf>=5.29.3,<6.0", - "jupyter", "docker>=7.1.0", "panel>=1.6.3", "playwright>=1.50.0", @@ -36,18 +35,6 @@ test = [ "pytest-mock>=3.14.1", "respx>=0.22.0", ] -kaggle = [ - "kagglehub>=0.3.10", - "pip>=25.0.1", - "nbdev>=2.4.2", - "papermill>=2.6.0", - "jupyter-lsp>=2.2.2", - "jupyter-server==2.12.5", - "notebook>=6.5.4", - "nbconvert>=6.5.1", - "traitlets==5.9.0", - "jupyter-bokeh>=4.0.5", -] docs = [ "chess>=1.11.2", "emoji>=2.14.1", @@ -61,7 +48,6 @@ docs = [ ] dev = [ { include-group = "test" }, - { include-group = "kaggle" }, { include-group = "docs" }, "mypy", "ruff",