Create an instance with a specified GPU type

更新时间:
复制 MD 格式

This topic shows you how to create an Elastic Container Instance (ECI) by specifying a GPU-accelerated ECS instance type.

Specifications

GPU-accelerated instance types are suitable for scenarios such as deep learning and image editing. You can run Docker images for GPUs directly on ECI GPU-accelerated instances. A NVIDIA graphics card driver is pre-installed in each instance. The supported driver and CUDA versions vary by GPU instance type.

Note

The gn8ia and gn8is instance families in the following table are available only in some regions outside China. To use these instance families, contact Alibaba Cloud sales.

Category

GPU instance family

Driver and CUDA versions

vGPU-accelerated instance family

sgn7i-vws

GRID 470, CUDA 11.4 (default)

vgn7i-vws

vgn6i-vws

GPU-accelerated compute-optimized instance family

gn7e

  • Tesla 470, CUDA 11.4 (default)

  • Tesla 535, CUDA 12.2

  • Tesla 550, CUDA 12.4

gn7i

gn7s

gn7

gn6v

gn6e

gn6i

gn5i

gn5

gn8ia

  • Tesla 535, CUDA 12.2 (default)

  • Tesla 550, CUDA 12.2

gn8is

Important

Starting March 17, 2025, specify only the major version number for GPU drivers, such as 535, instead of the full version number, such as 535.161.08. The created instance will use a driver with the specified major version, but the minor version may be updated. When an older driver is unpublished, a newer version is automatically used to create the instance. The support period for a driver version aligns with NVIDIA's official support. For more information, see NVIDIA Driver Documentation.

GPU driver update history

Update time

Update description

March 2025

  • The GRID 470 driver is updated to 470.239.06.

  • The Tesla 470 driver is updated to 470.256.02, the Tesla 535 driver is updated to 535.230.02, and the Tesla 550 driver is updated to 550.127.08.

  • The Tesla 525 driver is no longer supported. If you specify this driver, the system falls back to version 535.

For more information about ECS instance types, see the following topics:

Configuration

To create a GPU-accelerated instance, you must specify the GPU-accelerated instance type and the number of GPUs for each container.

Important
  • If you specify a GPU-accelerated instance type but not the number of GPUs for the containers, the instance fails to start.

  • By default, multiple containers can share GPUs. Ensure that the number of GPUs configured for a single container does not exceed the total number of GPUs available for the specified instance type.

API

When calling the CreateContainerGroup operation to create an ECI instance, use the InstanceType parameter to specify an ECS GPU-accelerated instance type and the Gpu parameter to specify the number of GPUs for each container. For more information, see CreateContainerGroup.

Parameter

Type

Example

Description

InstanceType

String

ecs.gn6v-c8g1.2xlarge

The ECS GPU-accelerated instance type.

You can specify up to five instance types in a single request, separated by commas.

Container.N.Gpu

Integer

1

The number of GPUs to allocate to container N.

Note

You can also call the UpdateContainerGroup operation to change the GPU allocation for each container in a GPU-accelerated instance. For more information, see UpdateContainerGroup.

By default, an ECI GPU instance automatically installs a GPU driver and CUDA version compatible with its instance type. If your workload requires a different version, use the GpuDriverVersion parameter to specify it.

Parameter

Type

Example

Description

GpuDriverVersion

String

tesla=535

The GPU driver version.

Note

Changing the GPU driver version is supported only on select instance types. For details, see Specifications.

Console

When you create a GPU-accelerated instance in the Elastic Container Instance console, configure the GPU-related settings as follows:

  1. In the Container Group Configurations section, click the Specify Instance Type tab and select a GPU-accelerated instance type.

  2. In the Advanced Settings for each container, set the number of GPUs it uses.

    In this example, GPU is set to 1.