Notebook with kernel process
We support to start a notebook with a separated kernel process, and it could be enabled by PRIMEHUB_FEATURE_ENABLE_KERNEL_GATEWAY flag.
Basic idea
After notebook 6.0.0, it support the nb2kg (notebook to kernel gateway) feature and we could use different image to serve notebook and kernel process.
The benefit is:
- keep notebook as view to user, we maintain some front package, such as npm module and notebook extension for notebook.
- kernel image only to install notebook kernel modules and
jupyter-kernel-gatewaypackage
To separate frontend (notebook) and backend (kernel) could avoid to maintain lots of combination of software packages and versions.
Implementation
By default, primehub instance launches a notebook using a image that is a user picked in the spwaner page.
For seperated kernel process:
- using a user selected image to launch kernel process
- we install
kernel-gatewaypackage before launch kernel process
- launching notebook process with our prebuilt or standard notebook image (any image contains
nb2kgpackage) - overwrite the annotation
auditing.imagewith use selected image
Any resources settings are moving to kernel container's resource spec and unset resource spec in the notebook container.
Future Work
- should support air-gap with a prebuilt
kernel-gateway(for now, we do it bypip install)