Dynamically configure the Notebook images list

In Charmed Kubeflow, when a you’re creating a notebook, a dropdown list of container images is presented to choose from.

|831.5151515151514x574

This guide shows how to dynamically change the list of images for the 3 types of Notebook: Jupyter Notebooks, VSCode, and RStudio.

When you first install Charmed Kubeflow, these images lists are set to a default of commonly used images. For each type of Notebook, the list of available images is set in the config options of the jupyter-ui charm.

Contents :

View the list of images

View the current list of images by running:

# view the list of images for Jupyter Notebooks
juju config jupyter-ui jupyter-images

# view the list for VSCode
juju config jupyter-ui vscode-images

# view the list for RStudio
juju config jupyter-ui rstudio-images

Configure the list of images

The jupyter-images, vscode-images, and rstudio-images configs allow you to specify YAML input defining the list of images.

First, define a file images.yaml file with the format:

- some-image1
- some-image2
- some-image3

Make sure the images are publicly available, otherwise the Notebook server will not start.

An example of images.yaml :

- kubeflownotebookswg/jupyter-pytorch-full:v1.7.0
- kubeflownotebookswg/jupyter-tensorflow-full:v1.7.0
- swr.cn-south-1.myhuaweicloud.com/mindspore/jupyter-mindspore:v1.6.1

Next, you need to update the config by passing the file to Juju. Run:

juju config jupyter-ui jupyter-images=@images.yaml

To configure the other two components, follow the same pattern by replacing jupyter-images with vscode-images or rstudio-images.

Modify the existing list of images

To edit the existing list of images, export them to a file, edit the file, then import back to Juju:

juju config jupyter-ui jupyter-images > images_v1.yaml

# edit images_v1.yaml, save as images_v2.yaml

juju config jupyter-ui jupyter-images=@images_v2.yaml

The same can be done for vscode-images and rstudio-images in place of jupyter-images.

not work for me(

>  juju config jupyter-ui jupyter-images
> {}
> ERROR key "jupyter-images" not found in "jupyter-ui" application config or charm settings.

jupyter-ui version is 1.7/stable

Sorry @prizrak83, we should have a note on this that it is currently just in latest/edge and will be available as part of the regular bundle in 1.8/stable. I’ll add that now

1 Like

This post has been archived, as it been replaced by an updated doc that includes more configuration options. You can find it here.