GPUs are used to accelerate workloads, and Cloud Workstations supports attaching GPUs to workstations. Cloud Workstations supports many of the various GPU models that are available to attach to Compute Engine VMs. The model and quantity of GPUs to attach to each workstation are specified on the workstation configuration. Cloud Workstations handles attaching the GPUs and installing their device drivers.
Attaching GPUs to workstations will affect costs as described in the Cloud Workstations pricing overview.
Limitations
A workstation configuration may specify GPUs, subject to the following limitations:
- Cloud Workstations only supports GPUs for configurations that specify machine types in the N1 machine series or the A2 machine series. Refer to supported GPU models for details.
- The configuration must specify replica zones where the chosen GPU model is available.
- It is not possible to configure workstations to have more than one model of GPU attached at a time.
Supported GPU models
Cloud Workstations supports many of the GPU models that Compute Engine makes available. The models that are supported depend on the machine series chosen for the workstation configuration, as summarized in the following table.
N1 machine series
The N1 general-purpose machine series supports several GPU models, and workstation configurations that specify any of the N1 machine types can also specify one of the following GPU models. For the chosen GPU model, the configuration may specify a count of how many GPU cards to attach to each workstation.
GPU model | GPU counts |
---|---|
NVIDIA T4 (nvidia-tesla-t4 ) |
1, 2, or 4 GPUs |
NVIDIA P4 (nvidia-tesla-p4 ) |
1, 2, or 4 GPUs |
NVIDIA V100 (nvidia-tesla-v100 ) |
1, 2, 4, or 8 GPUs |
NVIDIA P100 (nvidia-tesla-p100 ) |
1, 2, or 4 GPUs |
A2 machine series
The A2 standard accelerator-optimized machine series has a fixed number of NVIDIA A100 GPUs attached, based solely on the chosen machine type.
The following table shows the mapping from machine type to the number of cards that will be attached.
GPU model | Machine type | GPU count |
---|---|---|
NVIDIA A100 40GB (nvidia-tesla-a100 ) |
a2-highgpu-1g |
1 GPU |
a2-highgpu-2g |
2 GPUs | |
a2-highgpu-4g |
4 GPUs | |
a2-highgpu-8g |
8 GPUs | |
a2-megagpu-16g |
16 GPUs |
Cloud Workstations does not support A2 ultra machine types.
Add GPUs to an Existing Workstation Configuration
To add GPUs to a workstation configuration, complete the steps in one of the following tabs.
Before you begin
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
Review the Cloud Workstations pricing overview to understand how your costs will be affected by configuring GPUs. Note that GPUs are attached to the pre-started virtual machines (VMs) specified by a configuration's Quick start pool size.
Updating your existing configuration
Console
Configure GPUs on an existing workstation configuration from the Google Cloud console, by doing the following:
In the Google Cloud console, go to the Workstation configurations page.
In the Workstation configurations list, click the Name of the configuration to add GPUs to.
On the Workstation configuration details page, click edit Edit.
On the Edit workstation configuration page, click Machine settings in the navigation menu.
Click the toggle to select GPUs instead of the General purpose machine family.
In the GPU type field, select the GPU Model that you want to use.
In the Number of GPUs field, select the number of GPU cards you want to attach to each workstation.
In the Machine type field, select the machine type you want to use.
Click Save to update the configuration.
gcloud
Configure GPUs on an existing workstation configuration by running the
gcloud workstations configs update
command.
First though, collect some information to see which GPU models are available and to choose one for your configuration:
Check which replica zones the configuration specifies by running the following
gcloud
CLI command:gcloud workstations configs describe \ --format="table(name.scope(workstationConfigs),replicaZones.list())" \ --project=PROJECT_ID \ --region=LOCATION \ --cluster=WORKSTATION_CLUSTER_ID \ WORKSTATION_CONFIG_ID
Replace the following:
PROJECT_ID
: the ID of the project that contains the workstation configuration.LOCATION
: the location of the workstation cluster.WORKSTATION_CLUSTER_ID
: the name workstation cluster that contains the workstation configuration.WORKSTATION_CONFIG_ID
: the name of the workstation configuration.
Choose a supported GPU model that is available in both of the configuration's replica zones by running the
gcloud compute accelerator-types list
command:gcloud compute accelerator-types list \ --format="table(name:sort=1,zone,description,maximumCardsPerInstance)" \ --filter='zone.basename()=(ZONES) AND name~"nvidia-tesla-(a100|p100|p4|t4|v100)$"' \ --project=PROJECT_ID
Replace
ZONES
with a comma-separated list of the replica zones determined in the previous step (for example,us-central1-a,us-central1-c
).Choose a GPU model that is listed twice in the table, indicating it is available in both replica zones.
Take note of the maximum cards you can attach for the chosen GPU model.
Determine which of the supported machine types are available in both of the configuration's replica zones using the
gcloud compute machine-types list
command.If you chose the NVIDIA A100 40GB GPU model in the previous step, your configuration must use the A2 machine series:
gcloud compute machine-types list \ --format="table(name,zone,guestCpus:sort=1)" \ --filter="name:a2-highgpu- OR name:a2-megagpu-" \ --zones=ZONES \ --project=PROJECT_ID
If you chose any other GPU model in the previous step, your configuration must use the N1 machine series:
gcloud compute machine-types list \ --format="table(name,zone,guestCpus:sort=1)" \ --filter="name:n1-standard-" \ --zones=ZONES \ --project=PROJECT_ID
Choose a machine type that is listed twice in the table, indicating it is available in both replica zones.
Now that you have selected a GPU model and compatible machine type, update the configuration:
For NVIDIA A100 40GB GPUs, run this command to update your configuration:
gcloud beta workstations configs update \ --project=PROJECT_ID \ --region=LOCATION \ --cluster=WORKSTATION_CLUSTER_ID \ WORKSTATION_CONFIG_ID \ --machine-type=A2_MACHINE_TYPE
Replace
A2_MACHINE_TYPE
with the chosen A2 machine type determined in the previous step (for example,a2-highgpu-1g
).For all other GPU models, run this command:
gcloud beta workstations configs update \ --project=PROJECT_ID \ --region=LOCATION \ß --cluster=WORKSTATION_CLUSTER_ID \ WORKSTATION_CONFIG_ID \ --machine-type=N1_MACHINE_TYPE \ --accelerator-type=ACCELERATOR_TYPE \ --accelerator-count=ACCELERATOR_COUNT
Replace the following:
N1_MACHINE_TYPE
: the chosen machine type from the N1 series (for example,n1-standard-2
).ACCELERATOR_TYPE
: the chosen GPU model's name (for example,nvidia-tesla-t4
).ACCELERATOR_COUNT
: the number of GPUs to attach to each workstation (for example,1
,2
,4
). Must be a power of two less than the maximum for the GPU model.
Create a new Workstation Configuration with GPUs
To create a new workstation configuration that attaches GPUs to workstations that are based on it, complete the steps in one of the following tabs.
Before you begin
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
Choose a GPU model and consult the GPU availability table to select a region where the chosen GPU model is available in at least two zones.
If you don't already have a cluster in the chosen region where you can create a new configuration, follow the steps to Create a workstation cluster in the region.
Review the Cloud Workstations pricing overview to understand how your costs will be affected by configuring GPUs. Note that GPUs are attached to the pre-started virtual machines (VMs) specified by a configuration's Quick start pool size.
Creating a new configuration
Console
Create a new workstation configuration with GPUs from the Google Cloud console, by doing the following:
In the Google Cloud console, go to the Workstation configurations page.
On the Workstation configurations page, click add_box Create.
On the Basic information step of the Create workstation configuration page, specify a name for your configuration in the Name field.
In the Workstation cluster field, select a cluster in the chosen region.
Click Continue to advance to the Machine settings step.
On the Machine settings step of the Create workstation configuration page, begin by clicking the toggle to select GPUs instead of the General purpose machine family.
Then, in the Zones field, select the checkboxes next to two zones where the GPU model you chose is available (see the GPU availability table.
In the GPU type field, select the GPU Model that you want to use.
In the Number of GPUs field, select the number of GPU cards you want to attach to each workstation.
In the Machine type field, select a compatible machine type.
Click Continue to configure the Environment settings and IAM policy before clicking Create to provision the new workstation configuration.
gcloud
Create a new workstation configuration with GPUs using the
gcloud
CLI, by running the
gcloud workstations configs create
command.
For NVIDIA A100 40GB GPUs run this command to create your configuration:
gcloud beta workstations configs create \ --project=PROJECT_ID \ --region=LOCATION \ --cluster=WORKSTATION_CLUSTER_ID \ WORKSTATION_CONFIG_ID \ --replica-zones=REPLICA_ZONES \ --machine-type=A2_MACHINE_TYPE
Replace the following:
PROJECT_ID
: the ID of the project that will contain the new workstation configuration.LOCATION
: the location of the workstation cluster where the configuration will be contained.WORKSTATION_CLUSTER_ID
: the name workstation cluster that will contain the new workstation configuration.WORKSTATION_CONFIG_ID
: the name of the new workstation configuration.REPLICA_ZONES
: exactly two zones in the cluster's region where the chosen GPU model is available (for example,us-central1-a,us-central1-c
).A2_MACHINE_TYPE
: the chosen A2 series machine type (for example,a2-highgpu-1g
).
For all other GPU models, run this command to create your configuration:
gcloud beta workstations configs create \ --project=PROJECT_ID \ --region=LOCATION \ --cluster=WORKSTATION_CLUSTER_ID \ WORKSTATION_CONFIG_ID \ --replica-zones=REPLICA_ZONES \ --machine-type=N1_MACHINE_TYPE \ --accelerator-type=ACCELERATOR_TYPE \ --accelerator-count=ACCELERATOR_COUNT
Replace the following:
PROJECT_ID
: the ID of the project that will contain the new workstation configuration.LOCATION
: the location of the workstation cluster where the configuration will be contained.WORKSTATION_CLUSTER_ID
: the name workstation cluster that will contain the new workstation configuration.WORKSTATION_CONFIG_ID
: the name of the new workstation configuration.REPLICA_ZONES
: exactly two zones in the cluster's region where the chosen GPU model is available (for example,us-central1-a,us-central1-c
).N1_MACHINE_TYPE
: the chosen N1 series machine type (for example,n1-standard-2
).ACCELERATOR_TYPE
: the chosen GPU model's name (for example,nvidia-tesla-t4
).ACCELERATOR_COUNT
: the number of GPUs to attach to each workstation (for example,1
,2
,4
).
NVIDIA GPU device drivers
Cloud Workstations installs the NVIDIA device drivers on workstations' host VMs during VM startup.
To determine which version device driver has been installed on a workstation, run the following command:
nvidia-smi --query-gpu=name,driver_version --format=csv
GPU availability by region and zone
You can search either by location or GPU model, or a combination of both.
Zones | Location | GPU platforms |
---|---|---|
asia-east1-a |
Changhua County, Taiwan, APAC | T4, P100 |
asia-east1-b |
Changhua County, Taiwan, APAC | |
asia-east1-c |
Changhua County, Taiwan, APAC | T4, V100, P100 |
asia-east2-a |
Hong Kong, APAC | T4 |
asia-east2-b |
Hong Kong, APAC | |
asia-east2-c |
Hong Kong, APAC | T4 |
asia-northeast1-a |
Tokyo, Japan, APAC | A100 40GB, T4 |
asia-northeast1-b |
Tokyo, Japan, APAC | |
asia-northeast1-c |
Tokyo, Japan, APAC | A100 40GB, T4 |
asia-northeast3-a |
Seoul, South Korea, APAC | A100 40GB |
asia-northeast3-b |
Seoul, South Korea, APAC | A100 40GB, T4 |
asia-northeast3-c |
Seoul, South Korea, APAC | T4 |
asia-south1-a |
Mumbai, India, APAC | T4 |
asia-south1-b |
Mumbai, India, APAC | T4 |
asia-south1-c |
Mumbai, India, APAC | T4 |
asia-southeast1-a |
Jurong West, Singapore, APAC | T4 |
asia-southeast1-b |
Jurong West, Singapore, APAC | A100 40GB, T4, P4 |
asia-southeast1-c |
Jurong West, Singapore, APAC | A100 40GB, T4, P4 |
australia-southeast1-a |
Sydney, Australia, APAC | T4, P4 |
australia-southeast1-b |
Sydney, Australia, APAC | P4 |
australia-southeast1-c |
Sydney, Australia, APAC | T4, P100 |
europe-north1-a europe-north1-b europe-north1-c |
Hamina, Finland, Europe | |
europe-west1-b |
St. Ghislain, Belgium, Europe | T4, P100 |
europe-west1-c |
St. Ghislain, Belgium, Europe | T4 |
europe-west1-d |
St. Ghislain, Belgium, Europe | P100, T4 |
europe-west2-a |
London, England, Europe | T4 |
europe-west2-c |
London, England, Europe | |
europe-west3-a |
Frankfurt, Germany, Europe | |
europe-west3-b |
Frankfurt, Germany, Europe | T4 |
europe-west3-c |
Frankfurt, Germany, Europe | |
europe-west4-a |
Eemshaven, Netherlands, Europe | A100 40GB, T4, V100, P100 |
europe-west4-b |
Eemshaven, Netherlands, Europe | A100 40GB, T4, P4, V100 |
europe-west4-c |
Eemshaven, Netherlands, Europe | T4, P4, V100 |
europe-west6-a europe-west6-b europe-west6-c |
Zurich, Switzerland, Europe | |
europe-west8-a europe-west8-b europe-west8-c |
Milan, Italy, Europe | |
europe-west9-a europe-west9-b europe-west9-c |
Paris, France, Europe | |
europe-west12-a europe-west12-b europe-west12-c |
Turin, Italy, Europe | |
europe-southwest1-a europe-southwest1-b europe-southwest1-c |
Madrid, Spain, Europe | |
me-west1-a |
Tel Aviv, Israel, Middle East | |
me-west1-b |
Tel Aviv, Israel, Middle East | A100 40GB, T4 |
me-west1-c |
Tel Aviv, Israel, Middle East | A100 40GB, T4 |
northamerica-northeast1-a |
Montréal, Québec, North America | P4 |
northamerica-northeast1-b |
Montréal, Québec, North America | P4 |
northamerica-northeast1-c |
Montréal, Québec, North America | T4, P4 |
southamerica-east1-a |
Osasco, São Paulo, Brazil, South America | T4 |
southamerica-east1-c |
Osasco, São Paulo, Brazil, South America | T4 |
southamerica-west1-a southamerica-west1-b southamerica-west1-c |
Santiago, Chile, South America | |
us-central1-a |
Council Bluffs, Iowa, North America | A100 40GB, T4, P4, V100 |
us-central1-b |
Council Bluffs, Iowa, North America | A100 40GB, T4, V100 |
us-central1-c |
Council Bluffs, Iowa, North America | A100 40GB, T4, P4, V100, P100 |
us-central1-f |
Council Bluffs, Iowa, North America | A100 40GB, T4, V100, P100 |
us-east1-b |
Moncks Corner, South Carolina, North America | A100 40GB, P100 |
us-east1-c |
Moncks Corner, South Carolina, North America | T4, V100, P100 |
us-east1-d |
Moncks Corner, South Carolina, North America | T4 |
us-east4-a us-east4-b us-east4-c |
Ashburn, Virginia, North America | T4, P4 |
us-east5-a |
Columbus, Ohio, North America | |
us-west1-a |
The Dalles, Oregon, North America | T4, V100, P100 |
us-west1-b |
The Dalles, Oregon, North America | A100 40GB, T4, V100, P100 |
us-west1-c |
The Dalles, Oregon, North America |
What's next
Specify GPUs using the Cloud Workstations API.
Learn about Running Compute Engine instances with GPU accelerators.
See the complete list of Compute Engine machine types.