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