A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/colab/docs/create-runtime-template below:

Create a runtime template in Colab Enterprise

Create a runtime template in Colab Enterprise Skip to main content

Stay organized with collections Save and categorize content based on your preferences.

Create a runtime template

This page shows you how to create a runtime template in Colab Enterprise.

To run code in your notebook, you use a compute resource called a runtime. You can use the default runtime or a runtime created from a runtime template. By creating a runtime template, you can configure the template to optimize a runtime's performance, cost, and other characteristics based on your needs.

Learn more about runtimes and runtime templates.

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.

    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Vertex AI, Dataform, and Compute Engine APIs.

    Enable the APIs

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

    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Vertex AI, Dataform, and Compute Engine APIs.

    Enable the APIs

Required roles

To get the permissions that you need to create a runtime template in Colab Enterprise, ask your administrator to grant you the Colab Enterprise Admin (roles/aiplatform.colabEnterpriseAdmin) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

One or more of the required roles includes the dataform.repositories.list permission. Users who are granted the dataform.repositories.list permission or the Code Creator (roles/dataform.codeCreator) role in a project can list the names of code assets in that project by using the Dataform API or the Dataform command-line interface (CLI). Non-administrators using BigQuery Studio can only see code assets that they created or that were shared with them. Create the runtime template

To create a runtime template, you can use the Google Cloud console, the Google Cloud CLI, the REST API, or Terraform.

Console

To create a runtime template:

  1. In the Google Cloud console, go to the Colab Enterprise Runtime templates page.

    Go to Runtime templates

  2. Click add_box New template.

    The Create new runtime template dialog appears.

Runtime basics
  1. In the Runtime basics section, enter a Display name.

  2. In the Region menu, select the region where you want your runtime template.

  3. Optional: Add a Description of your runtime template.

  4. Optional: To add a label, click add Add label, and then enter a Key and Value pair. To add more labels, repeat this step.

  5. Click Continue.

Configure compute
  1. In the Configure compute section, in the Machine type menu, select a machine type. For information on machine types, see the Machine families resource and comparison guide.

    If you select a machine type that has GPUs, select the Accelerator type and Accelerator count. If you're unable to select the number of GPUs that you want, you might need to increase your quota. See Request a quota adjustment.

  2. In the Data disk type menu, select a disk type.

  3. In the Data disk size field, enter a size in GB.

  4. In the Idle shutdown section:

  5. Click Continue.

Environment
  1. In the Environment section, select an Environment. The default is Latest (currently Python 3.11).

  2. Click Continue.

Networking and security
  1. In the Networking and security section, in the Network menu, select a network. If you don't select a network, your default network is selected.

  2. In the Subnetwork menu, select a subnetwork.

  3. To turn off public internet access, clear Enable public internet access.

  4. To turn off end-user credential access, clear Enable end-user credentials.

Finish creating the runtime template

Click Create to finish creating the runtime template.

Your runtime template appears in the list on the Runtime templates tab.

gcloud

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

Execute the following command:

Linux, macOS, or Cloud Shell Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running either gcloud init; or gcloud auth login and gcloud config set project.
gcloud colab runtime-templates create --display-name="DISPLAY_NAME" \
    --project=PROJECT_ID \
    --region=REGION \
    --machine-type=MACHINE_TYPE \
    --accelerator-type=ACCELERATOR_TYPE \
    --accelerator-count=ACCELERATOR_COUNT
Windows (PowerShell) Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running either gcloud init; or gcloud auth login and gcloud config set project.
gcloud colab runtime-templates create --display-name="DISPLAY_NAME" `
    --project=PROJECT_ID `
    --region=REGION `
    --machine-type=MACHINE_TYPE `
    --accelerator-type=ACCELERATOR_TYPE `
    --accelerator-count=ACCELERATOR_COUNT
Windows (cmd.exe) Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running either gcloud init; or gcloud auth login and gcloud config set project.
gcloud colab runtime-templates create --display-name="DISPLAY_NAME" ^
    --project=PROJECT_ID ^
    --region=REGION ^
    --machine-type=MACHINE_TYPE ^
    --accelerator-type=ACCELERATOR_TYPE ^
    --accelerator-count=ACCELERATOR_COUNT

For more information about the command for creating a runtime template from the command line, see the gcloud CLI documentation.

REST

Before using any of the request data, make the following replacements:

HTTP method and URL:

POST https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/notebookRuntimeTemplates

Request JSON body:

{
  "displayName": "DISPLAY_NAME",
  "machineSpec": {
    {
      "machineType": MACHINE_TYPE
      "acceleratorType": ACCELERATOR_TYPE,
      "acceleratorCount": ACCELERATOR_COUNT,
    }
  },
}

To send your request, choose one of these options:

curl Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login , or by using Cloud Shell, which automatically logs you into the gcloud CLI . You can check the currently active account by running gcloud auth list.

Save the request body in a file named request.json, and execute the following command:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/notebookRuntimeTemplates"
PowerShell Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login . You can check the currently active account by running gcloud auth list.

Save the request body in a file named request.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `


-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/notebookRuntimeTemplates" | Select-Object -Expand Content
If successful, the response body contains an instance of Operation.

For more information, see the notebookRuntimeTemplates.create REST API documentation.

Terraform

To learn how to apply or remove a Terraform configuration, see Basic Terraform commands. For more information, see the Terraform provider reference documentation.

The following sample uses the google_colab_runtime_template Terraform resource to create a Colab Enterprise runtime template.

Granting access to the runtime template

After you create a runtime template, you must grant access to it for a principal to be able to use it. A principal can create a runtime from a runtime template only when they have the following:

See Manage access to a runtime template.

Delete a runtime template

To delete a runtime template:

  1. In the Google Cloud console, go to the Colab Enterprise Runtime templates page.

    Go to Runtime templates

  2. In the Region menu, select the region that contains your runtime template.

  3. Select the runtime template that you want to delete.

  4. Click delete Delete.

  5. Click Confirm.

Troubleshoot

This section shows you how to resolve issues with creating runtime templates in Colab Enterprise.

Unable to select enough GPUs

While creating a runtime template, you can't select the number of GPUs that you want. This might be because you don't have enough quota.

Colab Enterprise uses Compute Engine quota for GPUs. For more information, see the Compute Engine quota and limits overview.

To resolve this issue, Request a quota adjustment.

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Runtime templates in Colab Enterprise allow users to configure runtime performance, cost, and characteristics according to their specific requirements."],["Creating a runtime template can be done through the Google Cloud console, the Google Cloud CLI, or Terraform, each with its own set of steps and configurations."],["Configuring a runtime template involves defining settings like machine type, disk type, idle shutdown behavior, and networking and security options."],["To utilize a runtime template, users need the appropriate access to the template and the necessary permissions to create runtimes."],["A user might need to increase their quota if they need a number of GPUs for their template that exceeds their current limit."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4