Customizing environments

If you want to use libraries and packages that are not included in the standard software configurations, you can install them directly from inside your notebook code, customize an existing environment template, or use a custom image that was created by an administrator.

Descriptions of available customization methods
Customization type Description
Packages are added as the result of running code inside a notebook, by using conda, mamba, and pip (Python) or install.packages() (R) - Installed libraries are available in all notebooks that share the same runtime pod
- For better dependency management, use conda or mamba rather than pip where possible
- Packages are installed from anaconda.org or from Anaconda Repository for IBM Cloud Pak for Data
Customization is defined in an environment template and applied by conda or mamba when a runtime starts and before notebook code is executed - The additional libraries and files are not persisted but they are installed each time that the runtime is started
- All project members can access this environment template
- Packages are installed from anaconda.org or from Anaconda Repository for IBM Cloud Pak for Data
A IBM Software Hub administrator installs a custom runtime image. Tools that can be used when building a custom image include conda, mamba, pip (Python packages), install.packages() (R packages) or microdnf (operating system dependencies) - A new custom image is built and uploaded based on an existing runtime image by using a Dockerfile
- A IBM Software Hub administrator is responsible for maintaining image updates, including security patches.
Customization methods per tool
Customization method Notebook editor JuypterLab IDE RStudio SPSS Modeler
Using conda, mamba or pip
Creating a software customization in an environment template
Building a custom image
Installing libraries from a CRAN repository

For more information, see Customizing environment templates

Note:

If you use Spark and Hadoop environments, you can't configure a software customization or build a custom image. However, you can still install software with conda, mamba, pip, or install.packages() (for R).

The default settings for conda, mamba, and pip in an environment template require that runtimes have access to the public network at the time that they are started. If access to the public network is not available or desired, you can:

Alternatively, ask your platform administrator to build a custom runtime image for you.

The diagram illustrates customization methods that you can apply if you want to use libraries and packages that are not included in the standard software configurations. The diagram shows options for accessing libraries in the public network as well as options for customizing without public access.

The diagram presents customization options that you can use to create environment templates that suit your needs

Note:

For packages that are installed directly from inside a notebook and packages that are installed at runtime, an IBM Software Hub administrator can:

  • Specify an internal Binary Repository Manager with conda channels that contains:
    • A local mirror or cache for packages from remote origins
    • Packages developed locally
  • Set up a corporate proxy or a file channel that is located on a Network File Storage system

Parent topic: Environments