Skip to content

List local Nebi workspaces in jhub-apps when no Nebi server is deployed - #260

Merged
aktech merged 8 commits into
mainfrom
local-nebi-app-envs
Oct 20, 2026
Merged

aktech merged 8 commits into
mainfrom
local-nebi-app-envs

Conversation

@aktech

@aktech aktech commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Without nebi-pack, the jhub-apps environment selector was always empty, so apps could not run in a user's environment.

Adds nebi.remote.enabled (default true). With false, the token exchange and the Nebi card are off and each user's selector lists their own local Nebi workspaces:

  • The list comes from the user's main JupyterLab. The hub saves it under /srv/jupyterhub/nebi-envs/ when the app form asks and when JupyterLab stops, and offers the saved list while JupyterLab is stopped.

  • An app pod copies the workspace's pixi.toml and pixi.lock into its own emptyDir and runs pixi install there. It uses neither JupyterLab's installed environment nor its Nebi database.

  • JHUB_APP_ENV_MANAGER=pixi is set on every pod.

  • Docs: a user guide, "Apps from your local Nebi environments", under Guides.

Add nebi.remote.enabled (default true). When false, the Nebi remote and
internal URLs resolve to empty, so the token exchange and the Nebi card
are off, and the jhub-apps environment selector lists the installed
workspaces from the Nebi instance in the user's running JupyterLab.

JHUB_APP_ENV_MANAGER=pixi is now set on every pod instead of only in the
token-exchange hook, so jhub-app-proxy can activate a local workspace.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Docs preview for local-nebi-app-envs:
https://local-nebi-app-envs.data-science-pack.pages.dev

@aktech aktech added the deploy-preview Deploy a k8s stack preview for this PR (Cloudflare Tunnel, GitHub SSO gated) label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The preview for this PR has expired.

Project Deployment Actions Updated
nebari-data-science-pack ⚫ Expired - 2026-10-05 12:04 UTC

Re-add the deploy-preview label to redeploy.

@github-actions
github-actions Bot temporarily deployed to pr-260-preview October 5, 2026 11:44 Destroyed
@aktech aktech added the extend-preview Push this preview's expiry back 20 minutes label Oct 5, 2026
@github-actions github-actions Bot removed extend-preview Push this preview's expiry back 20 minutes deploy-preview Deploy a k8s stack preview for this PR (Cloudflare Tunnel, GitHub SSO gated) labels Oct 5, 2026
aktech and others added 7 commits October 5, 2026 14:37
With no Nebi server, an app ran straight from the user's workspace: the
app pod opened the Nebi database in the home and used the environment
JupyterLab had installed. Both only work while all of a user's pods sit
on one node and share its volumes.

The app pod now copies the workspace's pixi.toml and pixi.lock into its
own emptyDir, registers the copy in a database of its own and runs
pixi install there, through the same init container the Nebi server
path uses. The environment selector offers each workspace as its
directory, so starting an app needs only those two files: neither
JupyterLab nor the Nebi database.

The selection reaches the init container through its environment rather
than its command line, for the Nebi server path as well, and paths
outside the user's storage are ignored.
Without a Nebi server the app form lists workspaces by asking the user's
running JupyterLab, so it was empty whenever JupyterLab was stopped. The
hub now saves each user's list under /srv/jupyterhub/nebi-envs/, both
when the form asks JupyterLab and when JupyterLab stops (the spawner asks
the pod directly before deleting it), and offers the saved list while
JupyterLab is stopped or when asking it fails.
@aktech
aktech marked this pull request as ready for review October 19, 2026 16:11
@aktech
aktech requested a review from pmeier as a code owner October 19, 2026 16:11
@aktech
aktech merged commit 77112c6 into main Oct 20, 2026
21 checks passed
@aktech
aktech deleted the local-nebi-app-envs branch October 20, 2026 09:46
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.

1 participant