feat(profiles): auto-inject GPU jupyterlab image for gpu: true profiles - #237
Open
tylerpotts wants to merge 2 commits into
Open
feat(profiles): auto-inject GPU jupyterlab image for gpu: true profiles#237tylerpotts wants to merge 2 commits into
gpu: true profiles#237tylerpotts wants to merge 2 commits into
Conversation
Profiles marked gpu: true in jupyterhub.custom.profiles get kubespawner_override.image set to the chart-derived GPU image (<singleuser.image.name>-gpu:<singleuser.image.tag>) unless an explicit image is present. Both jupyterlab images are built from the same commit with the same sha tag, so GPU profiles now track pack updates automatically instead of pinning a -gpu SHA in the deployer overlay. Deployers can override the injected ref chart-wide via jupyterhub.custom.gpu-image. The gpu key is stripped before profiles reach KubeSpawner. Closes #230
Contributor
|
Docs preview for |
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
Closes #230
Profiles in
jupyterhub.custom.profilescan now be markedgpu: true:At hub startup,
01-spawner.pyinjectskubespawner_override.imagewith the chart-derived GPU image, so GPU profiles track pack updates exactly like CPU profiles instead of pinning a-gpuSHA in the deployer overlay.How
build-images.yamlrun from the same commit, so they always share the samesha-<short>tag. The chart derives the GPU ref as<singleuser.image.name>-gpu:<singleuser.image.tag>via a newgpuJupyterlabImagehelper, exposed through_CHART_DERIVEDasgpu-image(same pattern asnebi-image)._resolve_gpu_profiles()in01-spawner.pyruns once at load: injects the image when none is set, leaves an explicitkubespawner_override.imagealone, and always strips thegpukey before KubeSpawner sees it.jupyterhub.custom.gpu-image.scripts/bump_image_tags.pyalready bumpssingleuser.image.tageach release, so the derived GPU ref stays current with zero script changes.Testing
tests/unit/test_spawner_profiles.py: injection, explicit-image precedence,gpu-key stripping, empty-derived-image fallback, input non-mutation, load-time wiring (7 new tests).tests/unit/test_chart_derived.py: rendered_CHART_DERIVEDcontains the derivedgpu-image; explicit override wins (2 new tests).helm lint/helm template(incl.--set nebariapp.enabled=falseas CI does) andruff check config/clean.Docs
docs/src/content/docs/server-profiles.md: new "The GPU image, without hardcoding a SHA" section.docs/src/content/docs/values-reference.md:gpu-imagerow.values.yaml:gpu-imageplaceholder + updated GPU profile example.