Skip to content

fix: add jupyterhub-singleuser so the image runs under JupyterHub - #21

Merged
kratsg merged 1 commit into
maniaclab:mainfrom
arosberg:fix/jupyterhub-singleuser
Nov 3, 2026
Merged

kratsg merged 1 commit into
maniaclab:mainfrom
arosberg:fix/jupyterhub-singleuser

Conversation

@arosberg

@arosberg arosberg commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Launching ml-platform from the UChicago AF BinderHub (binderhub.af.uchicago.edu, curated ml-platform:latest / ml-platform:2026.5) never starts a notebook server. The pod runs, but the container log shows:

Executing the command: jupyterhub-singleuser --ip=0.0.0.0 --port=8888
bash: line 1: jupyterhub-singleuser: command not found

and the hub gives up after its 180s http_timeout ("Server … didn't respond in 180 seconds").

The AF BinderHub starts every server with jupyterhub-singleuser, and since 2026-11-02 it runs in authenticated mode, where jupyterhub-singleuser checks each request with the Hub (OAuth). The ml and mlcpu environments have JupyterLab 4.6 / jupyter_server 2.21 but no jupyterhub package. No version of pixi.toml has ever included it, so the image can't run as a JupyterHub server. AF's repo2docker build appendix (pip install jupyterhub) doesn't help either, because it isn't applied to repos that ship their own Dockerfile.

Change

Add jupyterhub-singleuser = ">=5.4.2,<6" to [feature.mlbase.dependencies], so both the GPU (ml) and CPU (mlcpu) images get it.

  • >=5.4.2: 5.4.0/5.4.1 can't reach a hub over HTTPS from remote sites.
  • <6: stays on the same major version as the AF hub (JupyterHub 5.x). Without the cap the solver picks 6.1.1.

pixi.lock was regenerated with CONDA_OVERRIDE_CUDA=12.6 pixi lock (pixi 0.83.0). Changes, identical in ml and mlcpu:

Packages
Added jupyterhub-singleuser 5.5.2, jupyterhub-base 5.5.2, and their deps: alembic, sqlalchemy, mako, oauthlib, pamela, certipy, blinker
Moved PyPI → conda-forge (jupyterhub-base requires them as conda packages) annotated-types, cryptography, pyjwt, typing-inspection (same versions); pydantic 2.13.5 → 2.14.1, pydantic-core 2.46.5 → 2.50.1

Nothing else in the lock changes.

Testing

  • pixi lock solves for both environments with the constraint
  • CI builds both images (ml-platform-gpu, ml-platform-cpu). I couldn't run the local Docker builds from CLAUDE.md, so I'm relying on the PR workflow.
  • After a release: docker run --rm <image> /app/entrypoint.sh jupyterhub-singleuser --version reports 5.5.x
  • AF BinderHub: the curated ml-platform ref is bumped to the new tag, and launching it starts a server

Follow-up (AF side)

After release, bump the curated refs in maniaclab/flux_apps af/binderhub/files/hub/jhub_spawner_config.yaml (ml-platform:2026.5 → the new tag), so BinderHub rebuilds the image.

🤖 Generated with Claude Code

The UChicago AF BinderHub starts notebook servers with
`jupyterhub-singleuser`, which is what checks each request with the Hub
(OAuth) in authenticated mode. The ml and mlcpu environments ship
JupyterLab and jupyter_server but no jupyterhub package, so launching
ml-platform from the AF BinderHub fails with:

    jupyterhub-singleuser: command not found

The server never comes up, and the hub gives up after its 180s
http_timeout.

Add jupyterhub-singleuser to the shared mlbase feature, pinned to
>=5.4.2,<6:
- >=5.4.2: 5.4.0/5.4.1 can't reach a hub over HTTPS from remote sites.
- <6: stays on the same major version as the AF hub (JupyterHub 5.x).

The lock resolves to jupyterhub-singleuser / jupyterhub-base 5.5.2 in
both ml and mlcpu, plus their conda dependencies (alembic, sqlalchemy,
mako, oauthlib, pamela, certipy, blinker). annotated-types,
cryptography, pydantic, pydantic-core, pyjwt and typing-inspection move
from PyPI to conda-forge because jupyterhub-base requires them as conda
packages; only pydantic (2.13.5 -> 2.14.1) and pydantic-core
(2.46.5 -> 2.50.1) change version.

Regenerated with `CONDA_OVERRIDE_CUDA=12.6 pixi lock` (pixi 0.83.0).

Assisted-by: Claude Code:claude-opus-5-5
@kratsg
kratsg merged commit 38662d6 into maniaclab:main Nov 3, 2026
2 checks passed
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