wtree Cloud

GPU support

Configure NVIDIA GPUs on a server so Swarm services can use them.

wtree Cloud checks the server, configures the NVIDIA runtime for Docker and labels the Swarm node.

Before you start

wtree Cloud doesn't install drivers. The server needs:

  • NVIDIA GPU hardware.
  • NVIDIA drivers running. Check with nvidia-smi.
  • nvidia-container-runtime installed.
  • CUDA support.
  • A user with sudo privileges.

A remote server must have completed Set up server first, because GPU support lives on its Swarm node.

Open GPU setup

  • This server: go to Servers › This server, open the Panel menu in the header and click GPU setup.
  • Remote server: go to Servers, open the server, click Open setup under Set up server on the Overview tab, then open the GPU setup tab.

Read the status

Use the refresh button after changing anything on the server.

RowMeaning
NVIDIA driverInstalled, and its version.
GPU model / GPU memory / Available GPUsWhat nvidia-smi detects.
CUDA supportCUDA availability and version.
NVIDIA container runtimeWhether nvidia-container-runtime is installed.
Runtime configurationWhether nvidia is Docker's default runtime.
Swarm GPU supportWhether the node advertises GPUs to Swarm.

Enable it

Click the enable button and confirm. wtree Cloud then:

  1. Verifies the prerequisites and stops with an error if the driver or runtime is missing.
  2. Writes /etc/docker/daemon.json with nvidia as default runtime and the GPUs as a generic resource (GPU=<count>).
  3. Sets swarm-resource = "DOCKER_RESOURCE_GPU" in /etc/nvidia-container-runtime/config.toml.
  4. Restarts Docker.
  5. Labels the Swarm node gpu=true.

This replaces /etc/docker/daemon.json and restarts Docker, briefly interrupting running containers. Back up the file first if it holds custom settings.

Use the GPU in a service

Containers on the server see the GPUs because NVIDIA is the default runtime. In a multi-node cluster, pin GPU workloads with a placement constraint in the service's Settings › Resources › Swarm settings:

node.labels.gpu==true

On this page