-
This is an open source fork of Kubeflow notebook servers with new features, latest packages and others.
-
The following images are considered base images, which you can extend:
-
The Jupyter built-in with:
- Python
3.10
- JupyterLab
3.5
- Notebook
6.5
- Rust toolchain nightly
- Lance
- Elyra
3.15
- kfp
1.8
- jupyterlab-code-formatter
- black
- isort
- Python
- Any changes made by users after spawning a Kubeflow notebook will only last the lifetime of the pod, unless they are installed into a PVC-backed directory
- Extend one of the base images and install any
pip
packages your Kubeflow notebook users are likely to need.
- Extend one of the base images and install any
apt-get
packages your Kubeflow notebook users are likely to need.- WARNING: ensure you swap to
root
in the Dockerfile before runningapt-get
, and swap back tojovyan
after.
- WARNING: ensure you swap to
- Some use-cases might require custom scripts to run during the startup of the Notebook Server container, or advanced users might want to add additional services that run inside the container.
- To make this easy, we use the s6-overlay.
- The s6-overlay differs from other init systems, such as the popular tini.
- While
tini
was created to handle a single process running in a container as PID 1, thes6-overlay
is built to manage multiple processes and allows the creator of the image to determine which process failures should silently restart, and which should cause the container to exit.
- Scripts that need to run during the startup of the
container can be placed in
/etc/cont-init.d/
, and are executed in ascending alphanumeric order. - This script uses the with-contenv helper so that environment variables (passed to container) are available in the script.
- The purpose of this script is to snapshot any
KUBERNETES_*
environment variables into theRenviron.site
at pod startup, as without these variableskubectl
does not work.
- Extra services to be monitored by
s6-overlay
should be placed in their own folder under/etc/services.d/
containing a script calledrun
and optionally a finishing scriptfinish
.- An example of a service can be found in jupyter/s6/services.d/jupyterlab which is used to start JupyterLab itself.
- For more information about the
run
andfinish
scripts, please see the s6-overlay documentation. - WARNING: our example images run
s6-overlay
as$NB_USER
notroot
, meaning any files or scripts related tos6-overlay
should be owned by the$NB_USER
user.
- There may be cases when you need to run a service as root.
- To do this, you can change the Dockerfile to have
USER root
at the end, and then uses6-setuidgid
to run the user-facing services as$NB_USER
.
- To do this, you can change the Dockerfile to have