Container Images
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.
Images
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 | public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/base:{TAG} |
common base image |
codeserver | public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/codeserver:{TAG} |
base code-server (Visual Studio Code) image |
jupyter | public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/jupyter:{TAG} |
base JupyterLab image |
rstudio | public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/rstudio:{TAG} |
base RStudio image |
Full Images
These images extend the base images with common packages used by Data Scientists and ML Engineers.
Image Dependency Chart
This flow-chart shows how our 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:
- Build custom images that include them, or
- 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
- kubeflow sets an environment variable
- run as a user called
jovyan
:- the home directory of
jovyan
should be/home/jovyan
- the UID of
jovyan
should be1000
- the home directory of
- start successfully with an empty PVC mounted at
/home/jovyan
:- kubeflow mounts a PVC at
/home/jovyan
to keep state across Pod restarts
- kubeflow mounts a PVC at
Next steps
- Use your container image by specifying it when spawning your notebook server. (See the quickstart guide.)
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.