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 template 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 template that uses the custom image and then select this environment template to run your notebook or launch RStudio.
Required role: You need Admin or Editor permissions on the analytics project to create an environment template and select the custom image.
Following these steps to create an environment template.
Considerations
If you use custom runtime images, you must consider the following aspects:
- Custom images that were created before Cloud Pak for Data 4.5.1 cannot benefit from mamba, because the mamba binary is included in the runtime image itself. If the image contains no mamba, customizations will fallback to using conda by default.
- To use mamba in older custom images, you need to recreate the custom images based on the latest images available for download in Cloud Pak for Data 4.5.1 or you need to install mamba into your custom image.
- Custom runtime images for notebooks can't be built for Spark environments.
- Custom runtime images can't be used in a deployment. You need to create a separate image for Watson Machine Learning. See Working with custom images.
- 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