使用 Google Cloud 控制台创建 Deep Learning VM 实例
本页面介绍如何在 Google Cloud 控制台中使用 Google Cloud Marketplace 创建 Deep Learning VM Image 映像实例。
准备工作
- 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. 
- 
    
    
      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. 
创建新实例
- 前往 Google Cloud 控制台中的 Deep Learning VM Cloud Marketplace 页面。 
- 点击开始。如果看到项目选择窗口,请选择要在其中创建实例的项目。如果这是您第一次启动 Compute Engine 虚拟机,则必须等待初始 API 配置过程完成。 
- 在新建 Deep Learning VM 部署 (New Deep Learning VM deployment) 页面上,输入部署名称。该名称将作为虚拟机名称的基本组成部分。 为实例命名时,Compute Engine 会将 - -vm附加到此名称。
- 选择一个可用区,或保留默认值。 
- 在机器类型下,为您的虚拟机选择所需的规范,或保留默认值。 
- 在 GPU 下,选择 GPU 类型和 GPU 数量,或保留默认值。如果您不想使用 GPU,请点击删除 GPU 按钮。 
- 您可以选择 Enable access to JupyterLab via URL instead of SSH (Beta)。通过启用此 Beta 版功能,您可以使用网址访问 JupyterLab 实例。在您的 Google Cloud 项目中,任何拥有 Editor 或 Owner 角色的人都可以访问此网址。此功能仅适用于美国、欧盟和亚洲。 
- 选择机器学习框架,或保留默认值。 
- 点击部署。 
您刚刚创建了第一个 Deep Learning VM 实例。该实例部署后, Google Cloud 控制台会打开 Deployment Manager 页面,您可以在其中管理 Deep Learning VM 实例和其他部署。
访问新实例
创建 Deep Learning VM 实例后,它会自动启动。如需访问它,请执行以下操作:
- 在 Google Cloud 控制台中,前往“虚拟机实例”页面。 
- 在名称列下,点击虚拟机实例的名称。 
- 在远程访问部分中,点击第一个下拉列表,然后选择您希望如何访问该实例。您可以选择通过图形界面或命令行与该实例进行交互。   
Compute Engine 将传递您的 SSH 密钥并创建您的用户。如需了解详情,请参阅连接到实例。
停止实例
- 在 Google Cloud 控制台中,前往“虚拟机实例”页面。 
- 选中 Deep Learning VM 实例旁边的复选框。 
- 点击停止。 
启动实例
实例创建后会自动启动。如需在实例停止后手动启动实例,请执行以下操作:
- 在 Google Cloud 控制台中,前往“虚拟机实例”页面。 
- 选中 Deep Learning VM 实例旁边的复选框。 
- 点击启动。 
清理
为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。
- 前往 Google Cloud 控制台中的“部署”页面。 
- 选中 Deep Learning VM 部署旁边的复选框。 
- 点击删除。 
后续步骤
- 参阅从 Google Cloud Marketplace 创建 Deep Learning VM 实例,了解此过程的详细说明。
- 详细了解映像、映像系列和实例。