啟用預設的 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 的地區 |
|
| 不支援 L4 GPU 但支援 T4 GPU 的地區 |
|
| 不支援 L4 或 T4 GPU 的地區 | 系統不支援預設的 GPU 執行階段。 |
加速器適用情形
Colab Enterprise 支援下列加速器類型的預設執行階段:
- L4
- T4
如要瞭解這些加速器的區域供應情形,請參閱「使用加速器」。
事前準備
- 登入 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 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 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 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.
必要的角色
為確保您的使用者帳戶具備必要權限,能在 Colab Enterprise 中啟用搭載 GPU 的預設執行階段,請要求管理員將專案的 Colab Enterprise 管理員 (roles/aiplatform.colabEnterpriseAdmin) IAM 角色授予您的使用者帳戶。
管理員或許也能透過自訂角色或其他預先定義的角色,授予使用者帳戶必要權限。
為預設執行階段啟用 GPU
如要為預設執行階段啟用 GPU,請按照下列步驟操作:
-
前往 Google Cloud 控制台的 Colab Enterprise「我的筆記本」頁面。
-
在「Region」(區域) 選單中,選取包含筆記本的區域。
-
按一下要開啟的筆記本。如果尚未建立筆記本,請建立筆記本。
-
在筆記本中,按一下「連線」。
-
Colab Enterprise 連線至預設執行階段後,請按一下筆記本右上角的按鈕,切換至搭載 GPU 的預設執行階段。舉例來說,如果筆記本位於支援 L4 加速器的區域,請按一下「切換至 L4」。
Colab Enterprise 會建立新的預設 GPU 執行階段,然後連線至該執行階段。專案中的其他使用者可以切換至搭載 GPU 的預設執行階段。
關閉預設執行階段的 GPU
如要關閉切換至預設 GPU 執行階段的功能,請刪除名為 Default with GPU 的執行階段範本。請參閱「刪除執行階段範本」。
限制
搭載 GPU 的預設執行階段僅適用於支援特定加速器可用性的地區。請參閱加速器可用性。
如要切換至預設的 GPU 執行階段,必須先將筆記本連線至預設執行階段。
後續步驟
- 如要管理執行階段,請參閱「管理執行階段」。
- 進一步瞭解執行階段和執行階段範本。