> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/ai-capabilities/gpu-support.md).

# GPU support

GPU support lets you run hardware-accelerated labs in GCP sandboxes. Use it for model training, inference, rendering, and other workloads that do not perform well on CPU-only hosts.

{% hint style="info" %}
GPU support is available by request. Contact your Instruqt Customer Success team to enable it for your organisation.
{% endhint %}

GPU support builds on the standard GCP project flow. If you have not added a GCP project to a sandbox before, start with [GCP projects](/sandboxes/cloud-accounts/gcp-projects.md).

### What's supported

* **GPU types:** NVIDIA T4 and P4
* **VM instance family:** N1
* **Limit:** Up to 2 GPU-backed VMs per GCP project

#### Supported regions

| Region            | Location                 |
| ----------------- | ------------------------ |
| `europe-west1`    | Europe (Belgium)         |
| `us-central1`     | US (Iowa)                |
| `asia-southeast1` | Asia-Pacific (Singapore) |

{% hint style="warning" %}
GPUs are only available in these regions. When you attach a GPU, unsupported regions are removed from the selector.
{% endhint %}

### Before you begin

* GPU support must be enabled for your organisation.
* Your track or sandbox preset must already include a GCP project.
* Add the [Cloud Client](/sandboxes/cloud-accounts/cloud-client.md) if learners need the GCP console or `gcloud`.

### Example track

Use this example as a starting point:

* **Play it:** [GCP project – GPU VM](https://play.instruqt.com/examples/inspiration-library/examples/gcp-project-gpu-vm)
* **Source:** [instruqt/examples – gcp-project-gpu-vm](https://github.com/instruqt/examples/tree/master/instruqt-tracks/gcp-project-gpu-vm)

{% hint style="warning" %}
You won't be able to play this track unless GPU support is enabled for your workspace. You can still browse the source files to get a feel for how the sandbox is put together.
{% endhint %}

### Configure a GPU-backed VM

{% stepper %}
{% step %}

### Add a GCP project

Add a GCP cloud account with these values:

| Setting         | Value                                                 |
| --------------- | ----------------------------------------------------- |
| **Services**    | Compute Engine API (`compute.googleapis.com`)         |
| **Regions**     | Europe (Belgium), US (Iowa), Asia-Pacific (Singapore) |
| **User roles**  | Viewer, IAP-secured Tunnel User                       |
| **Admin roles** | Compute Admin, IAP Tunnel User                        |

In the web UI, click **+ Add a cloud account** and select **Google**.
{% endstep %}

{% step %}

### Add the Cloud Client container

Add the Instruqt Cloud Client container so learners can access the GCP console and `gcloud`:

```
gcr.io/instruqt/cloud-client:2
```

{% endstep %}

{% step %}

### Attach a GPU to the VM

When you add a VM to the GCP project, select:

* an **N1** instance type
* a **T4** or **P4** GPU

Each GCP project supports up to two GPU-backed VMs.

{% hint style="success" %}
Your sandbox is now configured for GPU workloads. Play the track and confirm startup time and behaviour before publishing.
{% endhint %}
{% endstep %}
{% endstepper %}

### Startup time and availability

**GPU capacity is allocated on a best-effort basis**. Startup depends on available hardware in a supported GCP region.

* **Typical startup time:** 5 to 9 minutes
* **HotStarts:** Supported

{% hint style="warning" %}
GPU availability depends on current GCP capacity. Startup can take longer during busy periods. Test ahead of live or time-sensitive sessions.
{% endhint %}

### Costs

GPU usage is billed in addition to standard cloud account costs. Your Customer Success team will confirm pricing when GPU support is enabled for your organisation.

### Related pages

* [GCP projects](/sandboxes/cloud-accounts/gcp-projects.md)
* [GCP IAM Permissions](/sandboxes/cloud-accounts/gcp-projects/gcp-iam-permissions.md)
* [Cloud Client](/sandboxes/cloud-accounts/cloud-client.md)
* [Securing your cloud accounts](/sandboxes/cloud-accounts/securing-your-cloud-accounts.md)
