Downloading the runtime definition

Every custom image that you create must be based on one of the standard images that are included in Watson Machine Learning. You can get the name of the image that is used by a runtime from the definition for the runtime.

Required role: You must be an admin of the Cloud Pak for Data instance to download a runtime definition.

You must retrieve the runtime definition by using the Cloud Pak for Data API and store it as a JSON file.

Table 1. The runtime definitions and their corresponding images
Runtime definition name Image description
runtime-25.1-py3.12 Runtime 25.1 on Python 3.12
runtime-24.1-py3.11 Runtime 24.1 on Python 3.11
spark-mllib_3.4-multi Spark runtime image
spss-modeler_batch SPSS runtime batch image
watsonx-cfm-custom-image-rd Runtime image for custom foundation models
Follow these steps to download the runtime definition by using cURL in the console:
  1. Get the required platform access token.
    1. Log in to Cloud Pak for Data as an administrator.
    2. Get the CPD platform URL (CPD_URL) by running:
      cpd-cli manage get-cpd-instance-details --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
    3. Get an authorization token.
      Note: You can also set the bearer token manually by omitting the jq command and copying the output of the accessToken field to the TOKEN variable. The usage of -k because of certificate issues. -k disables certificate validation.
  2. List the names of all available runtime definitions on the cluster:
    curl -ksS  -X GET -H "Authorization: ZenApiKey ${TOKEN}" "${CPD_URL}/v2/runtime_definitions" | jq -r ".resources[].entity.name"
  3. Download the runtime definition. Replace <runtime-definition-name> with the name of the runtime definition that you need for your customization:
    myRuntimeDefinition=<runtime-definition-name>; curl -ksS -X GET -H "Authorization: ZenApiKey ${TOKEN}" "${CPD_URL}/v2/runtime_definitions?include=launch_configuration" | jq '.resources[] | select(.entity.name=="'${myRuntimeDefinition}'") | .entity'  > ${myRuntimeDefinition}-server.json
    The following example shows how to download the runtime definition for runtime-25.1-py3.12. This saves the .entity JSON content to the file runtime-25.1-py3.12-server.json.
    myRuntimeDefinition="runtime-25.1-py3.12"; curl -ksS -X GET -H "Authorization: ZenApiKey ${TOKEN}" "${CPD_URL}/v2/runtime_definitions?include=launch_configuration" | jq '.resources[] | select(.entity.name=="'${myRuntimeDefinition}'") | .entity'  > ${myRuntimeDefinition}-server.json

Next step

Download the base image