Skip to content

Create a lightweight install option#175

Open
kaggle-agent wants to merge 2 commits into
cifrom
agent/sohier-20260619224002-c6cb83f1
Open

Create a lightweight install option#175
kaggle-agent wants to merge 2 commits into
cifrom
agent/sohier-20260619224002-c6cb83f1

Conversation

@kaggle-agent

@kaggle-agent kaggle-agent commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Playwright pulls in Chromium and ~20 system libraries and +400 MB of binaries but is only used by
the web.Browser tool, which itself seems to be used by relatively few benchmarks. Move it (and nest-asyncio) into
a new web-tools optional group with lazy imports, so users who don't need the browser tool can skip the heavy install. This should make kaggle-benchmarks small enough to be added to docker-python for some but not all use cases. The kaggle group still pulls in playwright, so the Kaggle/CI image remains unaffected.

Note that this doesn't change the user experience for people who install the base package, as pip installing playwright doesn't cover the chromium binaries required for playwright to run.

Precursor PR to https://github.com/Kaggle/docker-python/compare/add_benchmarks

Co-authored-by: kaggle-agent kaggle-agent@users.noreply.github.com


Task: sohier-20260619224002-c6cb83f1

Playwright pulls in Chromium and ~20 system libraries but is only used by
the web.Browser tool (~3% of benchmarks). Move it (and nest-asyncio) into
a new `web-tools` optional group with lazy imports, so users who don't need
the browser tool can skip the heavy install. The kaggle group still pulls
it in, so the Kaggle/CI image is unaffected.

Co-authored-by: kaggle-agent <kaggle-agent@users.noreply.github.com>
@SohierDane SohierDane changed the title Make Playwright an optional dependency Create a lightweight install option Jun 19, 2026
@SohierDane SohierDane requested a review from andrewmwang June 19, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants