啟用預設的 GPU 執行階段

如需預先發布版支援服務,請傳送電子郵件至 vertex-notebooks-previews-external@google.com

本文說明如何為專案中的 Colab Enterprise 使用者啟用搭載 GPU 的預設執行階段。啟用含 GPU 的預設執行階段後,使用者只要按一下筆記本中的按鈕,即可從一般預設執行階段切換至含 GPU 的預設執行階段。

本文適用於 Colab Enterprise 管理員,說明如何為機構中的其他使用者啟用含 GPU 的預設執行階段。並假設您瞭解下列事項:

  • 如何管理 Colab Enterprise 執行階段和執行階段範本。
  • 如何使用 Identity and Access Management (IAM) 控制存取權。

總覽

如要讓使用者切換至預設的 GPU 執行階段,管理員 (roles/aiplatform.colabEnterpriseAdmin) 或具備 aiplatform.notebookRuntimeTemplates.create 權限的使用者帳戶必須先建立預設的 GPU 執行階段。

首次建立預設 GPU 執行階段時,Colab Enterprise 會建立新的預設執行階段範本,其中包含 GPU 規格。原始預設執行階段不會受到影響,且會存在直到過期或刪除為止。建立新的預設 GPU 執行階段範本後,專案中具有 aiplatform.notebookRuntimes.assign 權限,且執行階段範本中具有 aiplatform.notebookRuntimeTemplates.apply 權限的任何使用者,都可以建立及使用預設的 GPU 執行階段。Colab Enterprise 使用者 (roles/aiplatform.colabEnterpriseUser) 角色已具備這些權限。

規格

預設 GPU 執行階段的規格與原始預設執行階段不同。可用的機器類型、GPU 和資料磁碟類型會因區域而異,因此部分規格可能與原始預設執行階段不同。

下表說明根據預設執行階段的區域,預設 GPU 執行階段的規格。

地區說明 預設執行階段規格
支援 L4 GPU 的地區
  • 機器類型g2-standard-4
  • 加速器:1 個 NVIDIA_L4 加速器
  • 資料磁碟:100 GB pd-balanced
不支援 L4 GPU 但支援 T4 GPU 的地區
  • 機器類型n1-standard-4
  • 加速器:1 個 NVIDIA_TESLA_T4 加速器
  • 資料磁碟:100 GB pd-standard
不支援 L4 或 T4 GPU 的地區 系統不支援預設的 GPU 執行階段。

加速器適用情形

Colab Enterprise 支援下列加速器類型的預設執行階段:

  • L4
  • T4

如要瞭解這些加速器的區域供應情形,請參閱「使用加速器」。

事前準備

  1. 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.
  2. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. 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 the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  5. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. 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 the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  8. 必要的角色

    為確保您的使用者帳戶具備必要權限,能在 Colab Enterprise 中啟用搭載 GPU 的預設執行階段,請要求管理員將專案的 Colab Enterprise 管理員 (roles/aiplatform.colabEnterpriseAdmin) IAM 角色授予您的使用者帳戶。

    如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。

    管理員或許也能透過自訂角色或其他預先定義的角色,授予使用者帳戶必要權限。

    為預設執行階段啟用 GPU

    如要為預設執行階段啟用 GPU,請按照下列步驟操作:

    1. 前往 Google Cloud 控制台的 Colab Enterprise「我的筆記本」頁面。

      前往「我的筆記本」

    2. 在「Region」(區域) 選單中,選取包含筆記本的區域。

    3. 按一下要開啟的筆記本。如果尚未建立筆記本,請建立筆記本

    4. 在筆記本中,點選「連線」

    5. Colab Enterprise 連線至預設執行階段後,請按一下筆記本右上角的按鈕,切換至搭載 GPU 的預設執行階段。舉例來說,如果筆記本位於支援 L4 加速器的區域,請按一下「切換至 L4」

    Colab Enterprise 會建立新的預設 GPU 執行階段,然後連線至該執行階段。專案中的其他使用者可以切換至搭載 GPU 的預設執行階段。

    關閉預設執行階段的 GPU

    如要關閉切換至預設 GPU 執行階段的功能,請刪除名為 Default with GPU 的執行階段範本。請參閱「刪除執行階段範本」。

    限制

    • GPU 預設執行階段僅適用於支援特定加速器可用性的地區。請參閱加速器可用性

    • 如要切換至預設的 GPU 執行階段,必須先將筆記本連線至預設執行階段。

    後續步驟