创建运行时模板
本页面介绍如何在 Colab Enterprise 中创建运行时模板。
如需在笔记本中运行代码,请使用名为运行时的计算资源。 您可以使用默认运行时或根据运行时模板创建的运行时。通过创建运行时模板,您可以配置模板以根据需要优化运行时的性能、费用和其他特性。
详细了解运行时和运行时模板。
准备工作
- 登录您的 Google Cloud 账号。如果您是新手 Google Cloud, 请创建一个账号来评估我们的产品在 实际场景中的表现。新客户还可获享 $300 赠金,用于 运行、测试和部署工作负载。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Agent Platform, Dataform, and Compute Engine APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Agent Platform, Dataform, and Compute Engine APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.
所需的角色
如需获得在 Colab Enterprise 中创建运行时模板所需的权限,请让您的管理员为您授予项目的 Colab Enterprise Admin (roles/aiplatform.colabEnterpriseAdmin) IAM 角色。如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。
创建运行时模板
如需创建运行时模板,您可以使用 Google Cloud 控制台、 Google Cloud CLI、REST API 或 Terraform。
控制台
如需创建运行时模板,请执行以下操作:
-
在 Google Cloud 控制台中,进入 Colab Enterprise 运行时模板 页面。
-
点击 新建模板。
此时会显示创建新的运行时模板对话框。
运行时基础知识
-
在运行时基本信息部分中,输入显示名称。
-
在区域菜单中,选择需要运行时模板的区域。
-
可选:添加运行时模板的说明。
-
可选:如需添加标签,请点击 添加标签,然后输入键和值对。 如需添加更多标签,请重复此步骤。
-
点击继续。
配置计算
-
在