Create a managed notebooks instance

This page shows you how to create a managed notebooks instance by using the Google Cloud Console. While creating your instance, you can configure your instance's hardware, encryption type, network, and other details.

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 Cloud project. Learn how to confirm that billing is enabled for your 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 Cloud project. Learn how to confirm that billing is enabled for your project.

  7. Enable the Notebooks API.

    Enable the API

Create an instance by using default settings

  1. In the Cloud Console, go to the Managed notebooks page.

    Go to Managed notebooks

  2. Click  New notebook.

  3. In the Notebook name field, enter a name for your instance.

  4. Click the Region drop-down list, and select a region for your instance.

  5. Optional: To modify your instance's advanced settings, click Advanced settings.

    For more information, see Create an instance by using advanced settings.

  6. Click Create.

    Vertex AI Workbench automatically starts your instance and activates an Open JupyterLab link when the instance is ready to use.

Create an instance by using advanced settings

To specify the environment, hardware configuration, encryption type, network, security, and permissions, expand Advanced settings.

Specify the environment

Vertex AI Workbench supports one environment option: Managed environment. Managed environment is selected by default and can't be deselected.

The Managed environment includes common frameworks like TensorFlow and PyTorch, and supports both CPU-only and GPU-enabled workflows.

Use custom Docker images

To run notebook files in a custom Docker container, add the custom Docker container image to your managed notebooks instance.

The custom Docker container image must be located in either Container Registry or Artifact Registry. You must have access to the container image. All users can access the images available in the deeplearning-platform-release project, which is located in Container Registry.

  1. In the Environment section, in Custom Docker images, select the Provide custom Docker images checkbox.

  2. Enter a Docker container image path or click Select to add one from Container Registry or Artifact Registry.

  3. To add another custom Docker image, click  Add another Docker image and repeat these steps.

Configure hardware

Select a hardware configuration for your environment. You can change this later from the JupyterLab user interface.

Confirm GPU availability

GPU accelerator availability is based on region, machine type, and the number of GPUs that you want. You might want to confirm availability by using the following resources:

Configure the hardware

To configure your hardware, complete the following:

  1. In the Hardware configuration section, select a Machine type.

  2. If you want to use GPUs, select a GPU type. If you don't see the GPU type that you want, check GPU availability for your machine type and region.

  3. If you chose to use GPUs, select a Number of GPUs, and then select Install NVIDIA GPU driver automatically for me.

  4. Select a Data disk type and Data disk size in GB.

Select encryption type

Choose either the default Google-managed encryption key or a Customer-managed encryption key (CMEK):

  1. In the Disk encryption section, select either the default Google-managed encryption key or select Customer-managed encryption key (CMEK).

  2. If you select Customer-managed encryption key (CMEK), click the drop-down list, and select your customer-managed key.

Enable idle shutdown

Idle shutdown is enabled by default to shut down your instance after 180 minutes of inactivity. You can change the number of minutes of inactivity before shutdown, or you can disable idle shutdown.

  • To change the number of minutes before shutdown, in the Idle shutdown section, in the Time of inactivity before shutdown (Minutes) field, change the value to an integer from 1 through 600.

  • To disable idle shutdown, in the Idle shutdown section, clear Enable Idle Shutdown.

Configure your network

By default, your managed notebooks instance uses a Google-managed network. If you want to, you can instead specify a network located within your project or a network that is shared with you. If you specify a network, the network requires a private services access connection. The network must also have internet access, or you must enable Private Google Access for the network.

  1. In the Networking section, select either Networks in this project or Networks shared with me.

  2. In the Network field, select the network that you want to use.

  3. In the Subnetwork field, select the subnetwork that you want to use.

  4. If you have not already configured a private services access connection for this network, click Set up connection and complete the following:

    1. In the Create a private services access connection dialog, enable the Service Networking API, and then click Enable API. If the Service Networking API is already enabled, click Continue.

    2. In the Allocate an IP range section, complete the dialog to select one or more existing IP ranges, create a new IP range, or use an automatically allocated IP range.

    3. When you have finished, click Continue.

  5. In the Create a connection section, review the network and allocated IP range that you selected, and then click Create connection.

Configure security options

The following features are enabled by default. You can disable these features when you create a managed notebooks instance:

  • nbconvert lets users export and download a notebook file that is formatted as HTML, PDF, LaTeX, or other format. To disable, clear the Enable nbconvert checkbox.
  • A managed notebooks instance lets users download files from the JupyterLab user interface. To disable, clear the Enable file downloading from Notebook UI checkbox.

Configure permissions

Vertex AI Workbench supports single user access only.

In the Owner field, enter the user account email address to use to access the JupyterLab user interface.

When you have finished configuring the advanced settings, click Create.

Open JupyterLab

After you create your instance, Vertex AI Workbench automatically starts the instance. When the instance is ready to use, Vertex AI Workbench activates an Open JupyterLab link.

  1. Next to your managed notebooks instance's name, click Open JupyterLab.

  2. The first time you access a managed notebooks instance's JupyterLab user interface, you must grant the Cloud SDK permission to access your data and authenticate your managed notebooks instance.

    1. In the Authenticate your managed notebook dialog, click the button to get an authentication code.

    2. Choose an account and click Allow. Copy the authentication code.

    3. In the Authenticate your managed notebook dialog, paste the authentication code, and then click Authenticate.

Your managed notebooks instance opens JupyterLab.

Open a new notebook file

  1. Select File > New > Notebook.

  2. In the Select Kernel dialog, select Python, and then click Select.

  3. Your new notebook file opens.

What's next

  • Try one of the tutorials that is included in your new managed notebooks instance. In the JupyterLab  File Browser, open the tutorials folder, and open one of the notebook files.

    The tutorials folder in the JupyterLab File Browser.