Container Images

About Container Images for Kubeflow Notebooks

Kubeflow Notebooks natively supports three types of notebooks, JupyterLab, RStudio, and Visual Studio Code (code-server), but any web-based IDE should work. Notebook servers run as containers inside a Kubernetes Pod, which means the type of IDE (and which packages are installed) is determined by the Docker image you pick for your server.


We provide a number of example container images to get you started.

Base Images

These images provide a common starting point for Kubeflow Notebook containers. See custom images to learn how to extend them with your own packages.

Dockerfile Registry Notes
base{TAG} common base image
codeserver{TAG} base code-server (Visual Studio Code) image
jupyter{TAG} base JupyterLab image
rstudio{TAG} base RStudio image

Full Images

These images extend the base images with common packages used by Data Scientists and ML Engineers.

Dockerfile Registry Notes
codeserver-python{TAG} code-server (Visual Studio Code) + Conda Python
jupyter-pytorch (CPU){TAG} JupyterLab + PyTorch (CPU)
jupyter-pytorch (CUDA){TAG} JupyterLab + PyTorch (CUDA)
jupyter-pytorch-full (CPU){TAG} JupyterLab + PyTorch (CPU) + common packages
jupyter-pytorch-full (CUDA){TAG} JupyterLab + PyTorch (CUDA) + common packages
jupyter-scipy{TAG} JupyterLab + SciPy packages
jupyter-tensorflow (CPU){TAG} JupyterLab + TensorFlow (CPU)
jupyter-tensorflow (CUDA){TAG} JupyterLab + TensorFlow (CUDA)
jupyter-tensorflow-full (CPU){TAG} JupyterLab + TensorFlow (CPU) + common packages
jupyter-tensorflow-full (CUDA){TAG} JupyterLab + TensorFlow (CUDA) + common packages
rstudio-tidyverse{TAG} RStudio + Tidyverse packages

Image Dependency Chart

This flow-chart shows how our notebook container images depend on each other.

A flow-chart showing how notebook container images depend on each other

Custom Images

Packages installed by users after spawning a Kubeflow Notebook will only last the lifetime of the pod (unless installed into a PVC-backed directory).

To ensure packages are preserved throughout Pod restarts users will need to either:

  1. Build custom images that include them, or
  2. Ensure they are installed in a PVC-backed directory

Image Requirements

For Kubeflow Notebooks to work with a container image, the image must:

  • expose an HTTP interface on port 8888:
    • kubeflow sets an environment variable NB_PREFIX at runtime with the URL path we expect the container be listening under
    • kubeflow uses IFrames, so ensure your application sets Access-Control-Allow-Origin: * in HTTP response headers
  • run as a user called jovyan:
    • the home directory of jovyan should be /home/jovyan
    • the UID of jovyan should be 1000
  • start successfully with an empty PVC mounted at /home/jovyan:
    • kubeflow mounts a PVC at /home/jovyan to keep state across Pod restarts

Next steps

  • Use your container image by specifying it when spawning your notebook server. (See the quickstart guide.)


Was this page helpful?

Last modified November 19, 2021: update `Kubeflow Notebooks` docs (#3003) (5ad6019a)