A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/distributed-cloud/edge/latest/docs/gpu below:

Manage GPU workloads | Distributed Cloud connected

Skip to main content Manage GPU workloads

Stay organized with collections Save and categorize content based on your preferences.

This page describes how to manage graphics processing unit (GPU) workloads on Google Distributed Cloud connected. To take advantage of this functionality, you must have a Distributed Cloud connected hardware configuration that contains GPUs. For more information, see Plan the hardware configuration.

Note: GPU workloads are only supported on legacy Distributed Cloud connected rack hardware ("Config 2") and on Distributed Cloud connected servers. GPU workloads are not supported on the refreshed Distributed Cloud connected rack hardware.

Distributed Cloud connected workloads can run in containers and on virtual machines:

To confirm that GPUs are present on a Distributed Cloud connected node, verify that the node has the vm.cluster.gke.io.gpu=true label. If the label is not present on the node, then there are no GPUs installed on the corresponding Distributed Cloud connected physical machine.

Allocate GPU resources

By default, all GPU resources on each node in the cluster are allocated to containerized workloads. To customize the allocation of GPU resources on each node, complete the steps in this section.

Configure GPU resource allocation
  1. To allocate GPU resources on a Distributed Cloud connected node, use the following command to edit the GPUAllocation custom resource on the target node:

    kubectl edit gpuallocation NODE_NAME --namespace vm-system

    Replace NODE_NAME with the name of the target Distributed Cloud node.

    In the following example, the command's output shows the factory-default GPU resource allocation. By default, all GPU resources are allocated to containerized (pod) workloads, and no GPU resources are allocated to virtual machine (vm) workloads:

    ...
    spec:
      pod:   2  # Number of GPUs allocated for container workloads
      vm:    0  # Number of GPUs allocated for VM workloads
    
  2. Set your GPU resource allocations as follows:

    The total number of allocated GPU resources must not exceed the number of GPUs installed on the physical Distributed Cloud connected machine on which the node runs; otherwise, the node rejects the invalid allocation.

    In the following example, two GPU resources have been reallocated from containerized (pod) workloads to virtual machine (vm) workloads:

    ...
    spec:
      pod:   0  # Number of GPUs allocated for container workloads
      vm:    2  # Number of GPUs allocated for VM workloads
    

    When you finish, apply the modified GPUAllocation resource to your cluster and wait for its status to change to AllocationFulfilled.

Check GPU resource allocation Configure a container to use GPU resources

To configure a container running on Distributed Cloud connected to use GPU resources, configure its specification as shown in the following example, and then apply it to your cluster:

  apiVersion: v1
  kind: Pod
  metadata:
    name: my-gpu-pod
  spec:
    containers:
    - name: my-gpu-container
      image: CUDA_TOOLKIT_IMAGE
      command: ["/bin/bash", "-c", "--"]
      args: ["while true; do sleep 600; done;"]
      env:
      resources:
        requests:
        GPU_MODEL: 2
        limits:
        GPU_MODEL: 2
    nodeSelector:
      kubernetes.io/hostname: NODE_NAME

Replace the following:

Configure a virtual machine to use GPU resources

To configure a virtual machine running on Distributed Cloud connected to use GPU resources, configure its VirtualMachine resource specification as shown in the following example, and then apply it to your cluster:

apiVersion: vm.cluster.gke.io/v1
kind: VirtualMachine
...
spec:
  ...
  gpu:
    model: GPU_MODEL
    quantity: 2

Replace the following:

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This document details the management of GPU workloads on Google Distributed Cloud connected, which requires a specific hardware configuration including GPUs."],["GPU workloads can run in both containers and virtual machines, with containers initially having all GPU resources allocated, and the built-in GPU driver is utilized, while VMs require manual driver installation and licensing."],["GPU resource allocation is customizable per node, and by default, they are allocated to containerized workloads, but they can be reallocated to virtual machine workloads."],["To allocate GPU resources, you must use the `kubectl edit gpuallocation` command, by which you can then check the allocation using `kubectl describe gpuallocations`."],["To configure containers and virtual machines to utilize GPU resources you need to modify their specification files, using the right `GPU_MODEL` value, and then apply them to your cluster."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4