MikhbarMIKHBAR
Artificial Intelligence

AWS Details Distributed Training on Amazon EKS with Ray Train

AWS highlights how the Ray Train Deep Learning Container helps streamline distributed PyTorch training across multiple nodes on Amazon EKS using Elastic Fabric Adapter.

AWS Details Distributed Training on Amazon EKS with Ray Train

Overcoming Distributed Training Container Challenges

Scaling PyTorch training across a cluster has traditionally been hindered by container configuration complexity rather than model code itself. Every container requires matching versions of the CUDA runtime, a compiled PyTorch build, NCCL, Elastic Fabric Adapter (EFA) userspace libraries, the AWS OFI NCCL plugin, and a compatible Ray version. Maintaining and rebuilding these images whenever a component changes introduces significant overhead.

To address this operational burden, AWS provides the Ray Train Deep Learning Container. AWS assembles, tests, and publishes the complete stack as a single unit in Amazon Elastic Container Registry (Amazon ECR) Public, allowing engineering teams to run distributed workloads using the container exactly as published without building custom images.

EKS cluster with a CPU system node running KubeRay and the Ray head, and two EFA-enabled g6.12xlarge GPU worker nodes in one Availability Zone
Image related to the report from AWS Machine Learning Blog · Source: AWS Machine Learning Blog

Cluster Architecture with KubeRay and Amazon EKS

Deploying Ray clusters on Amazon Elastic Kubernetes Service (Amazon EKS) relies on KubeRay, an open-source Kubernetes operator. KubeRay introduces a RayCluster resource that enables operators to define both head and worker groups within a single manifest. The operator automatically builds, maintains, and replaces failed pods to keep the cluster functioning reliably.

In a typical configuration, a CPU system node runs the KubeRay operator and the Ray head, while dedicated GPU instances handle training execution. The Ray head coordinates the global control store, dashboard, and job server without handling training tasks directly.

Sample cluster: a CPU system node runs the KubeRay operator and a Ray head with no GPUs, and two EFA-enabled g6.12xlarge nodes each run one four-GPU Ray worker pod
Image related to the report from AWS Machine Learning Blog · Source: AWS Machine Learning Blog

Fine-Tuning Qwen2.5-1.5B with PyTorch FSDP

A reference sample demonstrates how to fine-tune the Qwen2.5-1.5B model using PyTorch Fully Sharded Data Parallel (FSDP) across eight NVIDIA GPUs on two EFA-enabled g6.12xlarge instances. Because the container already includes the necessary networking stack, multi-node collectives route efficiently over EFA without requiring manual network configuration inside the image.

The training code is encapsulated in a single function paired with a RayCluster manifest and a variable file. Because the environment variables and runtime settings are defined externally, teams can customize package dependencies or network transports per job without modifying the underlying base image.

One FSDP step showing weights gathered in the forward and backward passes and gradients reduce-scattered, with traffic between instances taking the NCCL, AWS OFI NCCL plugin, libfabric, and EFA path
Image related to the report from AWS Machine Learning Blog · Source: AWS Machine Learning Blog

Operational Benefits of Pre-Built DLCs

Using published Deep Learning Containers eliminates several common friction points in machine learning infrastructure. Nodes pull the public image without requiring registry credentials, and the container automatically checks host NVIDIA drivers against bundled CUDA forward-compatibility libraries upon startup.

Additionally, the containers avoid separate role definitions by allowing the runtime environment to supply the start command. AWS tests these releases extensively against multi-node EFA and KubeRay configurations, helping ensure consistent performance and preventing silent fallbacks to slower TCP sockets.

Sources

Continue chronologically

Related entity coverage