使用 Google Cloud 控制台创建 Colab Enterprise 笔记本
了解如何使用 Google Cloud 控制台创建 Colab Enterprise 笔记本并在默认运行时中运行代码。本页面还介绍了如何重命名、导入和删除笔记本。
准备工作
- 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.createpermission. Learn how to grant roles.
 
- 
  
    Verify that billing is enabled for your Google Cloud project. 
- 
  
  
    
      Enable the Vertex AI, 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
      (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 Vertex AI, 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.
- 
  在 Google Cloud 控制台中,前往 Colab Enterprise 我的笔记本页面。 
- 
  在区域菜单中,选择要创建笔记本的区域。 
- 
  点击 新建笔记本。 Vertex AI 会创建并打开您的笔记本。 
- 
  在 Google Cloud 控制台中,前往 Colab Enterprise 我的笔记本页面。 
- 
  在区域菜单中,选择包含笔记本的区域。 
- 
  点击您要打开的笔记本。 
- 
  将指针悬停在要运行的代码单元上,然后点击 运行单元按钮。 
- 
  如果这是您第一次连接到启用了最终用户凭据的运行时,系统会显示登录对话框。 如需为 Colab Enterprise 授予对用户凭据的访问权限,请完成以下步骤: - 
    在登录对话框中,点击您的用户账号。 
- 
    选择查看、修改、配置和删除您的 Google Cloud 数据...,为 Colab Enterprise 授予对用户凭证的访问权限。   
- 
    点击继续。 
 
- 
    
- 
  在 Google Cloud 控制台中,前往 Colab Enterprise 我的笔记本页面。 
- 
  在区域菜单中,选择包含笔记本的区域。 
- 
  在要重命名的笔记本旁边,点击操作菜单,然后选择重命名。 
- 
  在重命名笔记本对话框中,更改笔记本的名称,然后点击重命名。 
- 
  在 Google Cloud 控制台中,前往 Colab Enterprise 我的笔记本页面。 
- 
  在区域菜单中,选择要在其中导入笔记本的区域。 
- 
  点击 导入。 
- 
  在导入笔记本对话框中,选择导入来源。 
- 
  如果您选择: - 您的电脑,请前往并选择要导入的笔记本文件。
- Cloud Storage,请前往并选择 Cloud Storage 中的笔记本。
- 网址,请输入要导入的笔记本文件的网址。
 
- 
  如需添加其他笔记本,请点击 添加笔记本。 
- 
  添加要导入的笔记本后,点击导入。 Colab Enterprise 会导入您的笔记本文件。 
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
- 
  在 Google Cloud 控制台中,前往 Colab Enterprise 我的笔记本页面。 
- 
  在区域菜单中,选择包含要删除的笔记本的区域。 
- 
  在要删除的笔记本旁边,点击 操作菜单,然后选择 删除笔记本。 
- 
  在删除笔记本对话框中,点击确认。 
- 如需查找可帮助您快速启动项目的笔记本,请参阅笔记本库。 
所需的角色
    
      如需获得创建 Colab Enterprise 笔记本并在运行时运行笔记本代码所需的权限,请让您的管理员为您授予项目的 Colab Enterprise User (roles/aiplatform.colabEnterpriseUser) IAM 角色。
  
  
  
  
  如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。
  
  
创建笔记本
如需使用 Google Cloud 控制台创建 Colab Enterprise 笔记本,请执行以下操作:完成本文档中描述的任务后,您可以通过删除所创建的资源来避免继续计费。如需了解详情,请参阅清理。
在默认运行时中运行代码
如需在默认运行时中运行 Colab Enterprise 笔记本的代码,请执行以下操作:
运行时启动后,Colab Enterprise 会连接到运行时并运行单元中的代码。
重命名笔记本
如需重命名 Colab Enterprise 笔记本,请执行以下操作:导入笔记本
如需将笔记本导入到 Colab Enterprise,请执行以下操作:清理
为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。
为避免因本教程中使用的资源导致您的 Google Cloud 账号产生费用,请删除包含这些资源的项目,或者保留该项目但删除各个资源。
 运行单元按钮。
 运行单元按钮。