Chapter 4. Managing Jupyter notebook servers
4.1. Accessing the Jupyter administration interface
You can use the Jupyter administration interface to control notebook servers in your Red Hat OpenShift AI environment.
Prerequisite
- You are part of the OpenShift Container Platform administrator group. For more information, see Adding administrative users for OpenShift Container Platform.
Procedure
To access the Jupyter administration interface from OpenShift AI, perform the following actions:
- In OpenShift AI, in the Applications section of the left menu, click Enabled.
- Locate the Jupyter tile and click Launch application.
On the page that opens when you launch Jupyter, click the Administration tab.
The Administration page opens.
To access the Jupyter administration interface from JupyterLab, perform the following actions:
-
Click File
Hub Control Panel. On the page that opens in OpenShift AI, click the Administration tab.
The Administration page opens.
-
Click File
Verification
You can see the Jupyter administration interface.
4.2. Starting notebook servers owned by other users
Administrators can start a notebook server for another existing user from the Jupyter administration interface.
Prerequisites
- You are part of the OpenShift Container Platform administrator group. For more information, see Adding administrative users for OpenShift Container Platform.
- You have launched the Jupyter application, as described in Launching Jupyter and starting a notebook server.
Procedure
- On the page that opens when you launch Jupyter, click the Administration tab.
On the Administration tab, perform the following actions:
- In the Users section, locate the user whose notebook server you want to start.
- Click Start server beside the relevant user.
- Complete the Start a notebook server page.
- Optional: Select the Start server in current tab checkbox if necessary.
Click Start server.
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 tab.
The JupyterLab interface opens according to your selection.
Verification
- The JupyterLab interface opens.
Additional resources
4.3. Accessing notebook servers owned by other users
Administrators can access notebook servers that are owned by other users to correct configuration errors or to help them troubleshoot problems with their environment.
Prerequisites
- You are part of the OpenShift Container Platform administrator group. For more information, see Adding administrative users for OpenShift Container Platform.
- You have launched the Jupyter application, as described in Launching Jupyter and starting a notebook server.
- The notebook server that you want to access is running.
Procedure
- On the page that opens when you launch Jupyter, click the Administration tab.
On the Administration page, perform the following actions:
- In the Users section, locate the user that the notebook server belongs to.
- Click View server beside the relevant user.
- On the Notebook server control panel page, click Access notebook server.
Verification
- The user’s notebook server opens in JupyterLab.
4.4. Stopping notebook servers owned by other users
Administrators can stop notebook servers that are owned by other users to reduce resource consumption on the cluster, or as part of removing a user and their resources from the cluster.
Prerequisites
-
If you are using specialized OpenShift AI groups, you are part of the administrator group (for example,
rhoai-admins
). If you are not using specialized groups, you are part of the OpenShift Container Platform administrator group. For more information, see Adding administrative users for OpenShift Container Platform. - You have launched the Jupyter application, as described in Launching Jupyter and starting a notebook server.
- The notebook server that you want to stop is running.
Procedure
- On the page that opens when you launch Jupyter, click the Administration tab.
Stop one or more servers.
If you want to stop one or more specific servers, perform the following actions:
- In the Users section, locate the user that the notebook server belongs to.
To stop the notebook server, perform one of the following actions:
- Click the action menu (⋮) beside the relevant user and select Stop server.
Click View server beside the relevant user and then click Stop notebook server.
The Stop server dialog box appears.
- Click Stop server.
If you want to stop all servers, perform the following actions:
- Click the Stop all servers button.
- Click OK to confirm stopping all servers.
Verification
- The Stop server link beside each server changes to a Start server link when the notebook server has stopped.
4.5. Stopping idle notebooks
You can reduce resource usage in your OpenShift AI deployment by stopping notebook servers that have been idle (without logged in users) for a period of time. This is useful when resource demand in the cluster is high. By default, idle notebooks are not stopped after a specific time limit.
If you have configured your cluster settings to disconnect all users from a cluster after a specified time limit, then this setting takes precedence over the idle notebook time limit. Users are logged out of the cluster when their session duration reaches the cluster-wide time limit.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- You are part of the administrator group for OpenShift AI in OpenShift Container Platform.
Procedure
-
From the OpenShift AI dashboard, click Settings
Cluster settings. - Under Stop idle notebooks, select Stop idle notebooks after.
- Enter a time limit, in hours and minutes, for when idle notebooks are stopped.
- Click Save changes.
Verification
The
notebook-controller-culler-config
ConfigMap, located in theredhat-ods-applications
project on the WorkloadsConfigMaps page, contains the following culling configuration settings: -
ENABLE_CULLING
: Specifies if the culling feature is enabled or disabled (this isfalse
by default). -
IDLENESS_CHECK_PERIOD
: The polling frequency to check for a notebook’s last known activity (in minutes). -
CULL_IDLE_TIME
: The maximum allotted time to scale an inactive notebook to zero (in minutes).
-
- Idle notebooks stop at the time limit that you set.
4.6. Configuring a custom notebook image
In addition to notebook images provided and supported by Red Hat and independent software vendors (ISVs), you can configure custom notebook images that cater to your project’s specific requirements.
Red Hat supports you in adding custom notebook images to your deployment of OpenShift AI and ensuring that they are available for selection when creating a notebook server. However, Red Hat does not support the contents of your custom notebook image. That is, if your custom notebook image is available for selection during notebook server creation, but does not create a usable notebook server, Red Hat does not provide support to fix your custom notebook image.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
-
You are assigned the
cluster-admin
role in OpenShift Container Platform. - Your custom notebook image exists in an image registry and is accessible.
-
You can access the Settings
Notebook images dashboard navigation menu option.
Procedure
From the OpenShift AI dashboard, click Settings
Notebook images. The Notebook images page appears. Previously imported notebook images are displayed. To enable or disable a previously imported notebook image, on the row containing the relevant notebook image, click the toggle in the Enable column.
NoteIf you have already configured an accelerator identifier for a notebook image, you can specify a recommended accelerator for the notebook image by creating an associated accelerator profile. To do this, click Create profile on the row containing the notebook image and complete the relevant fields. If the notebook image does not contain an accelerator identifier, you must manually configure one before creating an associated accelerator profile.
Click Import new image. Alternatively, if no previously imported images were found, click Import image.
The Import Notebook images dialog appears.
-
In the Image location field, enter the URL of the repository containing the notebook image. For example:
quay.io/my-repo/my-image:tag
,quay.io/my-repo/my-image@sha256:xxxxxxxxxxxxx
, ordocker.io/my-repo/my-image:tag
. - In the Name field, enter an appropriate name for the notebook image.
- Optional: In the Description field, enter a description for the notebook image.
- Optional: From the Accelerator identifier list, select an identifier to set its accelerator as recommended with the notebook image. If the notebook image contains only one accelerator identifier, the identifier name displays by default.
Optional: Add software to the notebook image. After the import has completed, the software is added to the notebook image’s meta-data and displayed on the Jupyter server creation page.
- Click the Software tab.
- Click the Add software button.
- Click Edit ( ).
- Enter the Software name.
- Enter the software Version.
- Click Confirm ( ) to confirm your entry.
- To add additional software, click Add software, complete the relevant fields, and confirm your entry.
Optional: Add packages to the notebook images. After the import has completed, the packages are added to the notebook image’s meta-data and displayed on the Jupyter server creation page.
- Click the Packages tab.
- Click the Add package button.
- Click Edit ( ).
- Enter the Package name.
- Enter the package Version.
- Click Confirm ( ) to confirm your entry.
- To add an additional package, click Add package, complete the relevant fields, and confirm your entry.
- Click Import.
Verification
- The notebook image that you imported is displayed in the table on the Notebook images page.
- Your custom notebook image is available for selection on the Start a notebook server page in Jupyter.
Additional resources