Create a specific version of an instance

This page describes how to create a specific version of a Vertex AI Workbench instance.

Why you might want to create a specific version

To ensure that your Vertex AI Workbench instance has software that is compatible with your code or application, you might want to create a specific version.

Vertex AI Workbench instance images are updated frequently, and specific versions of preinstalled software and packages vary from version to version.

To learn more about specific Vertex AI Workbench versions, see the Vertex AI release notes.

After you create a specific version of a Vertex AI Workbench instance, you can upgrade it. Upgrading the instance updates the preinstalled software and packages. For more information, see Upgrade an instance's environment.

Before you begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. Enable the Notebooks API.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Make sure that billing is enabled for your Google Cloud project.

  7. Enable the Notebooks API.

    Enable the API

Create a specific version

You can create a specific version of a Vertex AI Workbench instance by using the Google Cloud console or the Google Cloud CLI.

Console

To create a specific version of a Vertex AI Workbench instance, do the following:

  1. When you create an instance, in the Environment section, select Use a previous version.

  2. Click the Version list, and select a version. Versions are numbered in the form of an M followed by the number of the release, for example, M123.

  3. Complete the rest of the instance-creation dialog, and then click Create.

    Vertex AI Workbench creates an instance and automatically starts it. When the instance is ready to use, Vertex AI Workbench activates an Open JupyterLab link.

gcloud

Before using any of the command data below, make the following replacements:

  • INSTANCE_NAME: the name of your Vertex AI Workbench instance; must start with a letter followed by up to 62 lowercase letters, numbers, or hyphens (-), and cannot end with a hyphen
  • PROJECT_ID: your project ID
  • LOCATION: the zone where you want your instance to be located
  • VM_IMAGE_NAME: the image name; to get a list of the available image names, use the get-config command
  • MACHINE_TYPE: the machine type of your instance's VM
  • METADATA: custom metadata to apply to this instance; for example, to specify a post-startup-script, you can use the post-startup-script metadata tag, in the format: --metadata=post-startup-script=gs://BUCKET_NAME/hello.sh

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud workbench instances create INSTANCE_NAME \
    --project=PROJECT_ID \
    --location=LOCATION \
    --vm-image-project="cloud-notebooks-managed" \
    --vm-image-name=VM_IMAGE_NAME \
    --machine-type=MACHINE_TYPE \
    --metadata=METADATA

Windows (PowerShell)

gcloud workbench instances create INSTANCE_NAME `
    --project=PROJECT_ID `
    --location=LOCATION `
    --vm-image-project="cloud-notebooks-managed" `
    --vm-image-name=VM_IMAGE_NAME `
    --machine-type=MACHINE_TYPE `
    --metadata=METADATA

Windows (cmd.exe)

gcloud workbench instances create INSTANCE_NAME ^
    --project=PROJECT_ID ^
    --location=LOCATION ^
    --vm-image-project="cloud-notebooks-managed" ^
    --vm-image-name=VM_IMAGE_NAME ^
    --machine-type=MACHINE_TYPE ^
    --metadata=METADATA

For more information about the command for creating an instance from the command line, see the gcloud CLI documentation.

Vertex AI Workbench creates an instance and automatically starts it. When the instance is ready to use, Vertex AI Workbench activates an Open JupyterLab link in the Google Cloud console.

What's next