本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
UltraServers 在 Amazon 中使用 SageMaker HyperPod
SageMaker HyperPod 对 Ultraservers 的支持为人工智能和机器学习工作负载提供了高性能 GPU 计算能力。这些 Ultraserver 以 NVIDIA GB2 00 和 NVL72 架构为基础,在双机架配置中提供 18 GB2 00 个实例之间的 NVLink 连接,总计 72 B200。 GPUs该 NVLink 架构允许工作负载使用 GPU 通信,从而将可用的 GPU 容量和可寻址内存增加到离散实例所无法达到的范围之外,从而支持更复杂和资源密集型的 AI 模型。该 NVLink 连接由 NVIDIA IMEX 技术支持,该技术处理低级配置,以便在同一机架内的实例之间实现安全 GPU 交换矩阵连接。
HyperPod 通过智能拓扑感知和自动配置,简化了这些 GPU 集群的部署和管理。该平台会自动发现节点并将其标记为其物理位置和容量块信息,从而支持分布式工作负载的拓扑感知调度。 HyperPod 抽象了复杂的 IMEX 配置要求,使您可以专注于工作负载部署,而不是低级 GPU 架构设置。您可以选择灵活的部署选项,包括自管理节点和 EKS 托管节点组。Amazon EKS 提供经过优化的产品 AMIs ,包括预先配置的 NVIDIA 驱动程序、Fabric Manager、IMEX 驱动程序以及实现无缝操作所需的所有必要系统软件。
该集成包括容器放置功能,可确保使用标准的 Kubernetes 拓扑标签以最佳方式跨 NVL72 域调度分布式工作负载。内置监控和自动恢复功能提供操作支持,AMI 运行状况代理可从内核日志中检测 GPU 错误,并可以自动修复问题或替换托管节点组中的故障节点。GPU 规模、智能工作负载放置和自动化操作相结合,可帮助您专注于 AI/ML 创新,而不是基础架构的复杂性,同时从 GPU 投资中获得最大性能。
要使用 HyperPod 集群 UltraServers 进行设置,请参阅以下步骤:
-
创建基于 E KS 的 HyperPod 集群。选择实例组时,请务必选择一个 UltraServer。
-
创建集群后,使用以下命令安装可操作的插件:
NVIDIA 设备插件 v0.17.2
kubectl apply -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.17.2/deployments/static/nvidia-device-plugin.yml
FD DaemonSet v0.17.3
kubectl apply -k "https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.17.3"
GPU 功能发现
kubectl apply -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.17.2/deployments/static/gpu-feature-discovery-daemonset.yaml
您现在可以运行作业了。以下示例演示如何创建域、配置 IMEX 域和启用频道分配。这些步骤还允许您创建一个 pod 来为 NCCL 通信提供通道。
-
创建要与 Kubectl 一起使用的资源规范文件。
cat <<EOF > imex-channel-injection.yaml --- apiVersion: resource.nvidia.com/v1beta1 kind: ComputeDomain metadata: name: imex-channel-injection spec: numNodes: 1 channel: resourceClaimTemplate: name: imex-channel-0 --- apiVersion: v1 kind: Pod metadata: name: imex-channel-injection spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: nvidia.com/gpu.clique operator: Exists - key: topology.k8s.aws/ultraserver-id operator: In values: - <
UltraServer-ID
> containers: - name: ctr image: ubuntu:22.04 command: ["bash", "-c"] args: ["ls -la /dev/nvidia-caps-imex-channels; trap 'exit 0' TERM; sleep 9999 & wait"] resources: claims: - name: imex-channel-0 resourceClaims: - name: imex-channel-0 resourceClaimTemplateName: imex-channel-0 EOF -
应用您创建的配置。
kubectl apply -f imex-channel-injection.yaml
-
要验证您的 pod 是否已创建,请运行
get pods
命令。kubectl get pods kubectl get pods -n nvidia-dra-driver-gpu -l resource.nvidia.com/computeDomain
-
您还可以查看 pod 中的日志,看看它是否分配了通信信道。
kubectl logs imex-channel-injection
total 0 drwxr-xr-x 2 root root 60 Feb 19 10:43 . drwxr-xr-x 6 root root 380 Feb 19 10:43 .. crw-rw-rw- 1 root root 507, 0 Feb 19 10:43 channel0
-
您还可以检查日志,以验证自动化 IMEX 配置是否正在使用分配的频道运行。
kubectl logs -n nvidia-dra-driver-gpu -l resource.nvidia.com/computeDomain --tail=-1 /etc/nvidia-imex/nodes_config.cfg:
IMEX Log initializing at: 8/8/2025 14:23:12.081 [Aug 8 2025 14:23:12] [INFO] [tid 39] IMEX version 570.124.06 is running with the following configuration options [Aug 8 2025 14:23:12] [INFO] [tid 39] Logging level = 4 [Aug 8 2025 14:23:12] [INFO] [tid 39] Logging file name/path = /var/log/nvidia-imex.log [Aug 8 2025 14:23:12] [INFO] [tid 39] Append to log file = 0 [Aug 8 2025 14:23:12] [INFO] [tid 39] Max Log file size = 1024 (MBs) [Aug 8 2025 14:23:12] [INFO] [tid 39] Use Syslog file = 0 [Aug 8 2025 14:23:12] [INFO] [tid 39] IMEX Library communication bind interface = [JAug 8 2025 14:23:12] [INFO] [tid 39] IMEX library communication bind port = 50000 [Aug 8 2025 14:23:12] [INFO] [tid 39] Identified this node as ID 0, using bind IP of '10.115.131.8', and network interface of enP5p9s0 [Aug 8 2025 14:23:120] [INFO] [tid 39] nvidia-imex persistence file /var/run/nvidia-imex/persist.dat does not exist. Assuming no previous importers. [Aug 8 2025 14:23:12] [INFO] [tid 39] NvGpu Library version matched with GPU Driver version [Aug 8 2025 14:23:12] [INFO] [tid 63] Started processing of incoming messages. [Aug 8 2025 14:23:12] [INFO] [tid 64] Started processing of incoming messages. [Aug 8 2025 14:23:12] [INFO] [tid 65] Started processing of incoming messages. [Aug 8 2025 14:23:12] [INFO] [tid 39] Creating gRPC channels to all peers (nPeers = 1). [Aug 8 2025 14:23:12] [INFO] [tid 66] Started processing of incoming messages. [Aug 8 2025 14:23:12] [INFO] [tid 39] IMEX_WAIT_FOR_QUORUM != FULL, continuing initialization without waiting for connections to all nodes. [Aug 8 2025 14:23:12] [INFO] [tid 67] Connection established to node 0 with ip address 10.115.131.8. Number of times connected: 1 [Aug 8 2025 14:23:12] [INFO] [tid 39] GPU event successfully subscribed
-
验证完所有内容后,删除工作负载并移除配置。
kubectl delete -f imex-channel-injection.yaml