Introduction
Recently, AWS announced a distributed learning solution utilizing the Ray Train Deep Learning Container (DLC) on Amazon Elastic Kubernetes Service (EKS). This technology supports seamless training of PyTorch in a cluster environment and alleviates user burdens by integrating essential libraries such as CUDA, NCCL, and EFA. This change will be particularly beneficial for companies and researchers that require large-scale model training.
Necessity of Ray Train DLC
One of the biggest obstacles to running distributed learning of PyTorch in a cluster is the setup of containers. Each container requires the same CUDA runtime, NCCL, EFA user space libraries, etc., and setting this up each time demands significant time and effort. To address this issue, AWS developed the Ray Train DLC. This container comes pre-configured with all essential libraries, allowing users to start training without separate image builds.
AWS's Integrated Solution
AWS has published the Ray Train DLC on the Amazon Elastic Container Registry (Amazon ECR) Public, enabling users to easily download the necessary images. This solution has the following key features:
- Automated Library Management: Users do not need to worry about compatibility between NVIDIA drivers and CUDA versions. Compatibility libraries are automatically activated when the container starts.
- Single Image Usage: Both the head and worker of Ray use the same image, reducing management complexity.
- Flexibility in Environment Configuration: Packages or network settings required for each training task can be adjusted externally, eliminating the need to modify images each time.
Cluster Configuration and Operation
The cluster configuration utilizing Ray Train DLC is as follows. AWS manages the Ray cluster through an open-source Kubernetes operator called KubeRay. Users define the head group and worker group through a single manifest file, and KubeRay builds the cluster based on this. In this process, AWS provides the following structure:
- CPU System Nodes: The KubeRay operator and Ray head run here.
- EFA Supported Nodes: Training tasks are performed on g6.12xlarge instances equipped with NVIDIA L4 GPUs.
Performance and Efficiency
Ray Train DLC has an integrated EFA stack, enabling smooth data transfer between clusters. This ensures that NCCL does not drop to TCP sockets, maintaining optimal performance. AWS validates each release based on multi-node EFA and KubeRay training tests, ensuring stability and performance.
Conclusion
AWS's Ray Train DLC is an innovative solution that makes distributed learning of PyTorch simpler and more efficient. Developers can now perform large-scale model training without complex environment setups, which will positively impact both research and business. AWS's approach is expected to further advance the future of AI learning environments.