Skip to content

feat(singleuser): expose jupyterlab-gallery config via singleuser.gallery values#118

Open
oren-openteams wants to merge 3 commits into
mainfrom
feat/jupyterlab-gallery
Open

feat(singleuser): expose jupyterlab-gallery config via singleuser.gallery values#118
oren-openteams wants to merge 3 commits into
mainfrom
feat/jupyterlab-gallery

Conversation

@oren-openteams

@oren-openteams oren-openteams commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

👋 Reviewers — one explicit decision needed at the bottom under Open questions (default destination). Please leave a comment.

What

Exposes deploy-time configuration for jupyterlab-gallery via a new singleuser.gallery values block.

The extension itself is already shipped in the singleuser image (images/jupyterlab/pixi.toml line 86: jupyterlab-gallery = "==0.6.3" under [pypi-dependencies]), but the chart never wired up the corresponding GalleryManager traitlet 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 — new singleuser.gallery block (disabled by default; backward-compatible)
  • templates/singleuser-config.yaml — conditionally render GalleryManager traitlets into jupyter_server_config.py when enabled: true
  • README.md — document the new values block

No image changes; pixi.toml and pixi.lock are untouched.

Usage

singleuser:
  gallery:
    enabled: true
    title: "Examples"
    destination: "/home/jovyan/gallery"
    exhibits:
      - title: "Tutorials"
        git: "https://github.com/your-org/tutorials"
        description: "End-to-end tutorial notebooks"
      - title: "Starters"
        git: "https://github.com/your-org/starter-notebooks"

When enabled: false (default), no config is rendered — no behavior change for existing deploys.

Test plan

  • helm template with singleuser.gallery.enabled=false produces the same singleuser-config ConfigMap as before
  • helm template with enabled: true + 2 exhibits emits valid Python (parseable with python -c "exec(open(...).read())")
  • On a live cluster: spawn a user pod, confirm the Gallery launcher card appears with the configured exhibits
  • Click an exhibit, confirm it clones to destination and opens in the file browser

Open questions

  1. Default destination — I used /home/jovyan/gallery. The upstream README uses examples. Happy to switch if there's a chart-wide convention I missed.

History

The first push of this branch (commit 841c35a) also added a duplicate jupyterlab-gallery entry to the [dependencies] section of pixi.toml and regenerated pixi.lock. Both were redundant — the package was already pinned in [pypi-dependencies]. Commit 3d669a1 reverts both back to origin/main. Net diff against main is now schema-only.

…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.
@oren-openteams oren-openteams changed the title feat(singleuser): support jupyterlab-gallery for curated notebook exhibits feat(singleuser): expose jupyterlab-gallery config via singleuser.gallery values Jun 8, 2026
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