使用 Google Cloud 控制台创建实例
了解如何使用 Google Cloud 控制台创建 Gemini Enterprise Agent Platform Workbench 实例并打开 JupyterLab。本页面还介绍如何停止、启动、重置或删除实例。
准备工作
- 登录您的 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 Notebooks API.
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 Notebooks API.
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.
所需的角色
如需获得创建和管理 Agent Platform Workbench 实例所需的权限,请让您的管理员为您授予项目的 Notebooks Admin (roles/notebooks.admin) IAM 角色。如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。
创建实例
在 Google Cloud 控制台中,前往实例页面。
点击 新建。
对于名称,输入
my-instance。点击创建。
完成本文档中描述的任务后,您可以通过删除所创建的资源来避免继续计费。如需了解详情,请参阅清理。
打开 JupyterLab
在您创建实例后,Agent Platform Workbench 会自动启动该实例。当实例可供使用时,Agent Platform Workbench 会激活一个打开 JupyterLab 链接。
在实例名称旁边,点击打开 JupyterLab。
您的 Agent Platform Workbench 实例会打开 JupyterLab。
打开新的笔记本文件
在 JupyterLab 中,选择 文件 > 新建 > 笔记本。
在选择内核对话框中,选择 Python 3,然后点击选择。
系统会打开您的新笔记本文件。
停止实例
在 Google Cloud 控制台中,前往实例页面。
选择要停止的实例。
点击 停止。
启动实例
在 Google Cloud 控制台中,前往实例页面。
选择要启动的实例。
点击 开始。
重置实例
重置实例会强制清除实例内存中的内容,并将实例重置为初始状态。如需详细了解重置实例的工作原理,请参阅重置操作。
在 Google Cloud 控制台中,前往实例页面。
选择要重置的实例。
点击 重置,然后点击重置进行确认。
清理
为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。
如果您为了解 Agent Platform Workbench 实例而创建了一个新项目,但现在不再需要该项目,请删除项目。
如果您使用的是现有 Google Cloud 项目,请删除您创建的资源,以避免您的账号产生费用:
在 Google Cloud 控制台中,前往实例页面。
选择包含要删除的实例的行。
点击 删除。 (您可能需要点开 选项菜单才能看到删除按钮,具体取决于您的窗口大小。)
点击确认进行确认。
后续步骤
- 阅读 Agent Platform Workbench 实例简介。
- 如需使用笔记本帮助您开始使用 Gemini Enterprise Agent Platform 和其他 Google Cloud 服务,请参阅 Agent Platform 笔记本教程。
重置,然后点击重置进行确认。