Building custom images
You can build custom images based on Jupyter notebooks and RStudio runtime images available in IBM Watson Studio. The images contain pre-selected open-source, as well as selected IBM libraries. Building custom images enables you to optimize the standard software configuration of a runtime for your application needs. Custom images can also be used in air-gapped environments with requirements which forbid exposing any operations to the internet.
To create a custom image, you need to download the image of the runtime that you want to customize, build a new custom image by adding libraries to the image you downloaded, register the new image, and finally update the environment definition you created in your project to use the new custom image.
You can also build custom images based on the SPSS Modeler runtime images to install custom ODBC drivers. Follow the instructions under Building custom images to install ODBC drivers instead of the instructions here.
Creating and registering a custom image
Required role: You must be a Cloud Pak for Data cluster administrator to create and register a custom image.
Follow these steps to create and register a custom image:
-
Prepare to build a new image by:
-
Getting the registry URL to use for Docker commands and in scripts. The Watson Studio runtime images are stored in a Docker image registry. In Cloud Pak for Data, you can only use an external registry outside of the Cloud Pak for Data OpenShift cluster.
To use that registry, you need the URL to the external registry that was used during the installation of Cloud Pak for Data. You use the same URL for all commands and in all scripts that you run.
- Downloading the configuration file for the runtime image that you want to customize. See Downloading the configuration file.
- Downloading the image in the configuration. See Downloading the image.
-
- Adding customizations and building a new image. See Creating a custom image.
- Pushing the image to the container server. See Registering the custom image.
- Changing and uploading the configuration file. See Uploading the changed configuration.
Using the image in projects
After the custom image was created and registered, it can be selected in IBM Watson Studio to run notebooks or to launch RStudio. To do this, you need to create an environment definition that uses the custom image and then select this environment definition to run your notebook or launch RStudio.
Required role: You need Admin or Editor permissions on the analytics project to create an environment definition and select the custom image.
Following these steps to create an environment definition.
Considerations
If you use custom runtime images, you must consider the following aspects:
- Custom runtime images for notebooks can only be built for
default
(CPU) and Python with GPU environments, not for Spark environments. - It is your responsibility to ensure that all updates that are made to the available runtime images in Watson Studio, including all security updates, are also made to your custom images. Watch out for new fix packs or any related information. When new versions of Cloud Pak for Data are released, we strongly encourage you to rebuild all of your custom images.
- Custom images can only be used in the notebook editor, JuypterLab, and RStudio. You can't use custom images based on Watson Studio Jupyter runtimes in Watson Machine Learning or in Data Refinery.
- Currently, you can't add arbitrary notebook or JupyterLab extensions to a custom image.
Parent topic: Customizing environments