feat(singleuser): expose jupyterlab-gallery config via singleuser.gallery values#118
Open
oren-openteams wants to merge 3 commits into
Open
feat(singleuser): expose jupyterlab-gallery config via singleuser.gallery values#118oren-openteams wants to merge 3 commits into
oren-openteams wants to merge 3 commits into
Conversation
…ibits Add first-class support for the jupyterlab-gallery extension (already maintained in the nebari-dev org but not shipped or configurable in this chart today). Deployers wanting to surface curated starter notebooks/tutorials currently have to either build a fork of the singleuser image or use lifecycleHooks.postStart to pip-install at spawn time (~30s per spawn). This change: - Adds jupyterlab-gallery to images/jupyterlab/pixi.toml so the extension is in the singleuser image at build time - Exposes a new singleuser.gallery values block (enabled=false by default; no behavior change for existing deploys) - Renders GalleryManager traitlet config into jupyter_server_config.py when enabled, so exhibits, title, and destination are deploy-time configurable without code changes NOTE: images/jupyterlab/pixi.lock needs regeneration before merge — run `pixi update -m images/jupyterlab/` (or whatever the repo's canonical regen path is). The schema-only changes (values, template, README) are independently reviewable.
Resolves jupyterlab-gallery to 0.6.3 from conda-forge. Required for the Docker build's 'pixi install --locked' step in the jupyterlab/jupyterlab-base /jupyterlab-gpu/jupyterlab-gpu-base images.
jupyterlab-gallery==0.6.3 is already installed via pixi.toml's [pypi-dependencies] block (line 86). The [dependencies] entry I added in the first commit was a duplicate; the chart-level config plumbing in values.yaml + templates is the actual PR contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exposes deploy-time configuration for jupyterlab-gallery via a new
singleuser.galleryvalues block.The extension itself is already shipped in the singleuser image (
images/jupyterlab/pixi.tomlline 86:jupyterlab-gallery = "==0.6.3"under[pypi-dependencies]), but the chart never wired up the correspondingGalleryManagertraitlet config — so deployers couldn't actually configure which exhibits show up without forking the chart or post-processing the rendered ConfigMap.This PR fills that gap.
Changes
values.yaml— newsingleuser.galleryblock (disabled by default; backward-compatible)templates/singleuser-config.yaml— conditionally renderGalleryManagertraitlets intojupyter_server_config.pywhenenabled: trueREADME.md— document the new values blockNo image changes; pixi.toml and pixi.lock are untouched.
Usage
When
enabled: false(default), no config is rendered — no behavior change for existing deploys.Test plan
helm templatewithsingleuser.gallery.enabled=falseproduces the same singleuser-config ConfigMap as beforehelm templatewithenabled: true+ 2 exhibits emits valid Python (parseable withpython -c "exec(open(...).read())")destinationand opens in the file browserOpen questions
destination— I used/home/jovyan/gallery. The upstream README usesexamples. Happy to switch if there's a chart-wide convention I missed.History
The first push of this branch (commit
841c35a) also added a duplicatejupyterlab-galleryentry to the[dependencies]section ofpixi.tomland regeneratedpixi.lock. Both were redundant — the package was already pinned in[pypi-dependencies]. Commit3d669a1reverts both back toorigin/main. Net diff againstmainis now schema-only.