Create a runtime
This page shows you how to create, start, and delete a runtime in Colab Enterprise.
You can create a runtime to run code on a runtime that has a different configuration than the default. Runtimes are created based on a runtime template, which includes specifications like machine type and disk size.
To learn more about runtimes, see Runtimes and runtime templates.
Before you begin
- 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.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI, Dataform, and Compute Engine APIs.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI, Dataform, and Compute Engine APIs.
Required roles
To ensure that your user account has the necessary
permissions to create a runtime in Colab Enterprise,
ask your administrator to grant your user account 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.
Your administrator might also be able to give your user account the required permissions through custom roles or other predefined roles.
Create a runtime
To create a runtime, you can use the Google Cloud console or the Google Cloud CLI.
Console
To create a runtime:
-
In the Google Cloud console, go to the Colab Enterprise Runtimes page.
-
In the Region menu, select the region where you want your runtime. It must be in the same region as the notebook that uses it.
-
Click
Create runtime.The Create Vertex AI runtime dialog appears.
-
In the Runtime template menu, select a runtime template. If there aren't any runtime templates listed, create a runtime template.
-
In the Runtime name field, enter a name for your runtime.
-
Click Create.
By default, when you create a runtime, you automatically have the required permissions to start and delete that runtime.
gcloud
Before using any of the command data below, make the following replacements:
DISPLAY_NAME
: the display name for your runtime.RUNTIME_TEMPLATE_ID
: the ID of the runtime template. The runtime template specifies your runtime's compute configuration.PROJECT_ID
: your project ID.REGION
: the region where you want your runtime.
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud colab runtimes create --display-name="DISPLAY_NAME" \ --runtime-template=RUNTIME_TEMPLATE_ID \ --project=PROJECT_ID \ --region=REGION
Windows (PowerShell)
gcloud colab runtimes create --display-name="DISPLAY_NAME" ` --runtime-template=RUNTIME_TEMPLATE_ID ` --project=PROJECT_ID ` --region=REGION
Windows (cmd.exe)
gcloud colab runtimes create --display-name="DISPLAY_NAME" ^ --runtime-template=RUNTIME_TEMPLATE_ID ^ --project=PROJECT_ID ^ --region=REGION
By default, when you create a runtime, you automatically have the required permissions to start and delete that runtime.
For more information about the command for creating a runtime template from the command line, see the gcloud CLI documentation.
Start a runtime
To start a runtime, you can use the Google Cloud console or the gcloud CLI.
Console
To start a runtime:
-
In the Google Cloud console, go to the Colab Enterprise Runtimes page.
-
In the Region menu, select the region that contains your runtime.
-
Select the runtime that you want to start.
-
Click Start.
gcloud
Before using any of the command data below, make the following replacements:
RUNTIME_ID
: the ID of your runtime.PROJECT_ID
: your project ID.REGION
: the region where your runtime is located.
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud colab runtimes start RUNTIME_ID \ --project=PROJECT_ID \ --region=REGION
Windows (PowerShell)
gcloud colab runtimes start RUNTIME_ID ` --project=PROJECT_ID ` --region=REGION
Windows (cmd.exe)
gcloud colab runtimes start RUNTIME_ID ^ --project=PROJECT_ID ^ --region=REGION
For more information about the command for creating a runtime template from the command line, see the gcloud CLI documentation.
Delete a runtime
To delete a runtime, you can use the Google Cloud console or the gcloud CLI.
Console
To delete a runtime:
-
In the Google Cloud console, go to the Colab Enterprise Runtimes page.
-
In the Region menu, select the region that contains your runtime.
-
Select the runtime that you want to delete.
-
Click
Delete. -
Click Confirm.
gcloud
Before using any of the command data below, make the following replacements:
RUNTIME_ID
: the ID of your runtime.PROJECT_ID
: your project ID.REGION
: the region where your runtime is located.
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud colab runtimes delete RUNTIME_ID \ --project=PROJECT_ID \ --region=REGION
Windows (PowerShell)
gcloud colab runtimes delete RUNTIME_ID ` --project=PROJECT_ID ` --region=REGION
Windows (cmd.exe)
gcloud colab runtimes delete RUNTIME_ID ^ --project=PROJECT_ID ^ --region=REGION
For more information about the command for creating a runtime template from the command line, see the gcloud CLI documentation.
Troubleshoot
This section shows you how to resolve issues with creating runtimes in Colab Enterprise.
Unable to create a runtime
This issue occurs when you're unable to create a runtime. See also Unable to create a default runtime. The most common causes are:
Insufficient quota
If you are unable to create a runtime, you might have exceeded your Compute Engine runtime quota.
Colab Enterprise uses Compute Engine quota for runtimes. For more information, see the Compute Engine quota and limits overview.
To resolve this issue, request a higher quota limit.
Unavailable resources
The following error occurs when you try to create a runtime.
No available zone found for runtime RUNTIME_ID for machine type MACHINE_TYPE with accelerator type: ACCELERATOR. Please try again later.
This error occurs if there are no resources available for your machine type configuration within your notebook's region.
To resolve this issue, try a runtime with a different machine type configuration, or try again at a later time.
Default runtime already exists
The following error occurs when you try to create a runtime from the default runtime template when the default runtime already exists.
Failed to create runtime One click runtime already exists.
If you try to create a runtime from a default runtime template, Colab Enterprise tries to create a default runtime. There can only be one default runtime per user, project, and region. If the default runtime already exists, Colab Enterprise is unable to create another default runtime.
To resolve this issue, connect to the existing default runtime or create a runtime from a non-default runtime template.
Unable to create a default runtime
When Colab Enterprise creates a default runtime, it first creates a default runtime template that it uses to generate the default runtime. If you try to create a default runtime without the permissions required to create a runtime template, then Colab Enterprise can't create the default runtime.
To resolve this issue, ask your administrator to grant you a role that includes the
aiplatform.notebookRuntimeTemplates.create
permission.
What's next
- Learn more about runtimes and runtime templates.
- Connect to your runtime.
- Learn how to create a runtime template.