Chapter 5. Creating a project workbench
To examine and work with models in an isolated area, you can create a workbench. You can use this workbench to create a Jupyter notebook from an existing notebook container image to access its resources and properties. For data science projects that require data retention, you can add container storage to the workbench you are creating. If you require extra power for use with large datasets, you can assign accelerators to your workbench to optimize performance.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
-
If you use specialized OpenShift AI groups, you are part of the user group or admin group (for example,
rhoai-users
orrhoai-admins
) in OpenShift. - You have created a data science project that you can add a workbench to.
Procedure
From the OpenShift AI dashboard, click Data Science Projects.
The Data science projects page opens.
Click the name of the project that you want to add the workbench to.
The Details page for the project opens.
In the Workbenches section, click Create workbench.
The Create workbench page opens.
Configure the properties of the workbench you are creating.
- In the Name field, enter a name for your workbench.
- Optional: In the Description field, enter a description to define your workbench.
In the Notebook image section, complete the fields to specify the notebook image to use with your workbench.
- From the Image selection list, select a notebook image.
In the Deployment size section, specify the size of your deployment instance.
- From the Container size list, select a container size for your server.
- Optional: From the Accelerator list, select an accelerator.
- If you selected an accelerator in the preceding step, specify the number of accelerators to use.
- Optional: Select and specify values for any new environment variables.
Configure the storage for your OpenShift AI cluster.
- Select Create new persistent storage to create storage that is retained after you log out of OpenShift AI. Complete the relevant fields to define the storage.
- Select Use existing persistent storage to reuse existing storage and select the storage from the Persistent storage list.
To use a data connection, in the Data connections section, select the Use a data connection checkbox.
Create a new data connection as follows:
- Select Create new data connection.
- In the Name field, enter a unique name for the data connection.
- In the Access key field, enter the access key ID for the S3-compatible object storage provider.
- In the Secret key field, enter the secret access key for the S3-compatible object storage account that you specified.
- In the Endpoint field, enter the endpoint of your S3-compatible object storage bucket.
- In the Region field, enter the default region of your S3-compatible object storage account.
- In the Bucket field, enter the name of your S3-compatible object storage bucket.
Use an existing data connection as follows:
- Select Use existing data connection.
- From the Data connection list, select a data connection that you previously defined.
- Click Create workbench.
Verification
- The workbench that you created appears on the Details page for the project.
- Any cluster storage that you associated with the workbench during the creation process appears on the Details page for the project.
- The Status column, located in the Workbenches section of the Details page, displays a status of Starting when the workbench server is starting, and Running when the workbench has successfully started.
5.1. Launching Jupyter and starting a notebook server
Launch Jupyter and start a notebook server to start working with your notebooks. If you require extra power for use with large datasets, you can assign accelerators to your notebook server to optimize performance.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
-
You know the names and values you want to use for any environment variables in your notebook server environment, for example,
AWS_SECRET_ACCESS_KEY
. - If you want to work with a large data set, work with your administrator to proactively increase the storage capacity of your notebook server. If applicable, also consider assigning accelerators to your notebook server.
Procedure
- Locate the Jupyter tile on the Enabled applications page.
Click Launch application.
If you see an Access permission needed message, you are not in the default user group or the default administrator group for OpenShift AI. Ask your administrator to add you to the correct group by using Adding users.
If you have not previously authorized the
jupyter-nb-<username>
service account to access your account, the Authorize Access page appears prompting you to provide authorization. Inspect the permissions selected by default, and click the Allow selected permissions button.If you credentials are accepted, the Notebook server control panel opens displaying the Start a notebook server page.
Start a notebook server.
This is not required if you have previously opened Jupyter.
- In the Notebook image section, select the notebook image to use for your server.
If the notebook image contains multiple versions, select the version of the notebook image from the Versions section.
NoteWhen a new version of a notebook image is released, the previous version remains available and supported on the cluster. This gives you time to migrate your work to the latest version of the notebook image.
- From the Container size list, select a suitable container size for your server.
- Optional: From the Accelerator list, select an accelerator.
If you selected an accelerator in the preceding step, specify the number of accelerators to use.
ImportantUsing accelerators is only supported with specific notebook images. For GPUs, only the PyTorch, TensorFlow, and CUDA notebook images are supported. For Habana Gaudi devices, only the HabanaAI notebook image is supported. In addition, you can only specify the number of accelerators required for your notebook server if accelerators are enabled on your cluster. To learn how to enable GPU support, see Enabling GPU support in OpenShift AI.
Optional: Select and specify values for any new Environment variables.
The interface stores these variables so that you only need to enter them once. Example variable names for common environment variables are automatically provided for frequently integrated environments and frameworks, such as Amazon Web Services (AWS).
ImportantSelect the Secret checkbox for variables with sensitive values that must remain private, such as passwords.
- Optional: Select the Start server in current tab checkbox if necessary.
Click Start server.
The Starting server progress indicator appears. Click Expand event log to view additional information about the server creation process. Depending on the deployment size and resources you requested, starting the server can take up to several minutes. Click Cancel to cancel the server creation.
After the server starts, you see one of the following behaviors:
- If you previously selected the Start server in current tab checkbox, the JupyterLab interface opens in the current tab of your web browser.
If you did not previously select the Start server in current tab checkbox, the Starting server dialog box prompts you to open the server in a new browser tab or in the current browser tab.
The JupyterLab interface opens according to your selection.
Verification
- The JupyterLab interface opens.
Additional resources
Troubleshooting
- If you see the "Unable to load notebook server configuration options" error message, contact your administrator so that they can review the logs associated with your Jupyter pod and determine further details about the problem.
5.2. Options for notebook server environments
When you start Jupyter for the first time, or after stopping your notebook server, you must select server options in the Start a notebook server wizard so that the software and variables that you expect are available on your server. This section explains the options available in the Start a notebook server wizard in detail.
The Start a notebook server page consists of the following sections:
- Notebook image
Specifies the container image that your notebook server is based on. Different notebook images have different packages installed by default. If the notebook image has multiple versions available, you can select the notebook image version to use from the Versions section.
NoteNotebook images are supported for a minimum of one year. Major updates to preconfigured notebook images occur about every six months. Therefore, two supported notebook image versions are typically available at any given time. Legacy notebook image versions, that is, not the two most recent versions, might still be available for selection. Legacy image versions include a label that indicates the image is out-of-date.
From OpenShift AI 2.5, version 1.2 of notebook images is no longer supported. Notebooks that are already running on version 1.2 of an image will continue to work normally, but it is not available to select for new users or notebooks.
To use the latest package versions, Red Hat recommends that you use the most recently added notebook image.
After you start a notebook image, you can check which Python packages are installed on your notebook server and which version of the package you have by running the
pip
tool in a notebook cell.The following table shows the package versions used in the available notebook images.
Notebook images denoted with (Technology Preview)
in this table are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using Technology Preview features in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
Image name | Image version | Preinstalled packages |
---|---|---|
CUDA | 2023.2 (Recommended) |
|
2023.1 |
| |
1.2 |
| |
Minimal Python (default) | 2023.2 (Recommended) |
|
2023.1 |
| |
1.2 |
| |
PyTorch | 2023.2 (Recommended) |
|
2023.1 |
| |
1.2 |
| |
Standard Data Science | 2023.2 (Recommended) |
|
2023.1 |
| |
1.2 |
| |
TensorFlow | 2023.2 (Recommended) |
|
2023.1 |
| |
1.2 |
| |
TrustyAI | 2023.2 (Recommended) |
|
2023.1 |
| |
HabanaAI | 2023.2 (Recommended) |
|
code-server (Technology Preview) | 2023.2 (Recommended) |
|
- Deployment size
specifies the compute resources available on your notebook server.
Container size controls the number of CPUs, the amount of memory, and the minimum and maximum request capacity of the container.
Accelerators specifies the accelerators available on your notebook server.
Number of accelerators specifies the number of accelerators to use.
ImportantUsing accelerators is only supported with specific notebook images. For GPUs, only the PyTorch, TensorFlow, and CUDA notebook images are supported. For Habana Gaudi devices, only the HabanaAI notebook image is supported. In addition, you can only specify the number of accelerators required for your notebook server if accelerators are enabled on your cluster. To learn how to enable GPU support, see Enabling GPU support in OpenShift AI.
- Environment variables
Specifies the name and value of variables to be set on the notebook server. Setting environment variables during server startup means that you do not need to define them in the body of your notebooks, or with the Jupyter command line interface. Some recommended environment variables are shown in the table.
Table 5.2. Recommended environment variables Environment variable option Recommended variable names AWS
-
AWS_ACCESS_KEY_ID
specifies your Access Key ID for Amazon Web Services. -
AWS_SECRET_ACCESS_KEY
specifies your Secret access key for the account specified inAWS_ACCESS_KEY_ID
.
-
Additional resources