Post-installation tasks for the Watson Studio service

To finish setting up the Watson Studio service after installation, complete the appropriate tasks.

Optional tasks

You can perform the following optional tasks to enhance Watson Studio. You must have the appropriate permissions on the OpenShift cluster.

Task User role
Set the scaling for the service Project administrator
Set a new limit for the number of projects each user can create Project administrator
Set the time zone for the master node System administrator
Enable Visual Studio Code support Project and System administrator
Installing pre-trained NLP models for Python-based notebook runtimes Project administrator

Note: If Watson Studio is installed and running behind a firewall, that firewall must be configured to allow WebSocket connections (wss://). Enabling WebSocket connections is required when you're using notebooks and RStudio.

To set a new limit for the number of projects each user can create

By default, there is a limit of 200 projects that each user can create. You can increase or decrease this limit by specifying a new limit value in the Common Core Services operator as a Number or String. Replace <project_limit> with the new limit value, and run:

oc patch ccs ccs-cr -n ${CPD_INSTANCE_PROJECT} --type merge --patch '{"spec":{"projects_created_per_user_limit": <project_limit>}}'

To set the time zone after installing your service

If the service will be installed on a remote machine that runs in a different time zone than the master node, the time zone for the master node is overwritten by the time zone for the installer node. This time zone discrepancy results in scheduled jobs that don’t run at the correct time.

  1. Edit the timezone configmap, and then change the time zone string to the cluster time zone.

  2. Modify data.masterTimezone in the configmap and use the following command:

    oc edit configmap timezone
    

    and add the tz database code format associated with the master node time zone.

    Note: If you are using Red Hat OpenShift Container Platform 4.x, use the Coordinated Universal Time (UTC) time zone as the value of the data.masterTimezone in the configmap.

  3. If there is a pre-existing schedule, go to the Job details page in the UI and edit the schedule once to pick up the updated time zone.

To enable Visual Studio Code support

VS Code support is not enabled by default, because it has additional requirements regarding storage. Support for VS Code can be enabled by patching the ws CR:

oc patch -n ${PROJECT_CPD_INSTANCE} ws/ws-cr --type=merge --patch '{"spec":{"tools":{"enable_vscode":true,"storage_size":"5Gi"}}}'

Important:
The sizing of the PVC depends on the number of users that want to access their runtime by using VS Code. Allocate at least 500-600 MB per user, to make sufficient space available for installed extensions.

To check if patching is finished, run this command:

cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--components=ws

It should take between 5 to 10 minutes for all required changes to be performed.

Updating existing custom runtime definitions (earlier than 4.6)

If you are using custom images or a custom runtime definition for JupyterLab, update all manually created runtime definitions to add tools-data-pvc to the volume field:

  {
    "volume": "tools-data",
    "mountPath": "/tools-data",
    "claimName": "tools-data-pvc",
    "subPath": "users/$user_id",
    "optional": true
  }

Use these commands:

  1. Enter the NGINX pod:

    oc rsh -n ${PROJECT_CPD_INSTANCE} $(oc get pods -l component=ibm-nginx -o jsonpath='{.items[0].metadata.name}')
    
  2. Identify the runtime definitions that need to be changed:

    grep --files-without-match tools-data $(grep -l runtimeType.*jupyter-lab /user-home/_global_/config/.runtime-definitions/ibm/*)
    
  3. Patch the runtime definition:

    In this example, custom-rtdef-server.json is the name of the runtime definition.

    rtdef=custom-rtdef-server.json; cd /user-home/_global_/config/.runtime-definitions/ibm && jq '.volumes |= . + [{"volume": "tools-data","mountPath": "/tools-data","claimName": "tools-data-pvc","subPath": "users/$user_id","optional": true}]' $rtdef  > rtdef.tmp && mv rtdef.tmp $rtdef
    

Installing pre-trained NLP models for Python-based notebook runtimes

Runtime 22.2 with Python 3.10 is installed by default with Watson Studio on Cloud Pak for Data 4.6.

You can optionally install the pre-trained NLP models for the Watson Natural Language Processing library by running the following command:

oc patch -n ${PROJECT_CPD_INSTANCE} NotebookRuntime ibm-cpd-ws-runtime-222-py --type=merge --patch '{"spec":{"install_nlp_models":true}}'

Pre-trained NLP models are also supported with these optional runtimes:

  • ibm-cpd-ws-runtime-222-pygpu
  • ibm-cpd-ws-runtime-py39
  • ibm-cpd-ws-runtime-py39gpu

The pre-trained NLP models are large and take time to install. Use the following command to check the status of the notebook runtimes:

oc get -n ${PROJECT_CPD_INSTANCE} NotebookRuntime -o custom-columns=NAME:metadata.name,STATUS:status.runtimeStatus

The pre-trained NLP models are available only when the status column for the notebook runtimes changes to Completed.

Parent topic: IBM Watson Studio