

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# HyperPod 클러스터에 지표 내보내기 패키지 설치
<a name="sagemaker-hyperpod-cluster-observability-slurm-install-exporters"></a>

SageMaker HyperPod 팀이 제공하는 [기본 구성 수명 주기 스크립트](sagemaker-hyperpod-lifecycle-best-practices-slurm-slurm-base-config.md)에는 다양한 지표 내보내기 패키지의 설치도 포함됩니다. 설치 단계를 활성화하려면 [https://github.com/aws-samples/awsome-distributed-training/blob/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/config.py](https://github.com/aws-samples/awsome-distributed-training/blob/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/config.py) 파일에서 `enable_observability=True` 파라미터를 설정해야 합니다. 수명 주기 스크립트는 다음 오픈 소스 지표 내보내기 패키지를 사용하여 클러스터를 부트스트랩하도록 설계되었습니다.


|  |  |  | 
| --- |--- |--- |
| 이름 | 스크립트 배포 대상 노드 | 내보내기 설명 | 
| [Prometheus용 Slurm 내보내기](https://github.com/vpenso/prometheus-slurm-exporter) | 헤드(컨트롤러) 노드 |  Slurm 계정 지표를 내보냅니다.  | 
|  [EFA(Elastic Fabric Adapter) 노드 내보내기](https://github.com/aws-samples/awsome-distributed-training/tree/main/4.validation_and_observability/3.efa-node-exporter)  |  컴퓨팅 노드  |  클러스터 노드 및 EFA에서 지표를 내보냅니다. 패키지는 [Prometheus 노드 내보내기](https://github.com/prometheus/node_exporter) 의 포크입니다.  | 
|  [NVIDIA Data Center GPU Management(DCGM) 내보내기](https://github.com/NVIDIA/dcgm-exporter)  | 컴퓨팅 노드 |  NVIDIA GPU의 상태 및 성능에 대한 NVIDIA DCGM 메트릭을 내보냅니다.  | 

[https://github.com/aws-samples/awsome-distributed-training/blob/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/config.py](https://github.com/aws-samples/awsome-distributed-training/blob/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/config.py) 파일에서 `enable_observability=True`를 사용하면 [https://github.com/aws-samples/awsome-distributed-training/blob/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/lifecycle_script.py](https://github.com/aws-samples/awsome-distributed-training/blob/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/lifecycle_script.py) 스크립트에서 다음 설치 단계가 활성화됩니다.

```
# Install metric exporting software and Prometheus for observability
if Config.enable_observability:
    if node_type == SlurmNodeType.COMPUTE_NODE:
        ExecuteBashScript("./utils/install_docker.sh").run()
        ExecuteBashScript("./utils/install_dcgm_exporter.sh").run()
        ExecuteBashScript("./utils/install_efa_node_exporter.sh").run()

    if node_type == SlurmNodeType.HEAD_NODE:
        wait_for_scontrol()
        ExecuteBashScript("./utils/install_docker.sh").run()
        ExecuteBashScript("./utils/install_slurm_exporter.sh").run()
        ExecuteBashScript("./utils/install_prometheus.sh").run()
```

컴퓨팅 노드에서 스크립트는 NVIDIA Data Center GPU Management(DCGM) 내보내기와 EFA(Elastic Fabric Adapter) 노드 내보내기를 설치합니다. DCGM Exporter는 NVIDIA GPU에서 지표를 수집하는 Prometheus용 Exporter로, GPU 사용량, 성능 및 상태를 모니터링할 수 있습니다. 반면 EFA 노드 내보내기는 HPC 클러스터에서 지연 시간이 짧고 고대역폭 통신에 필수적인 EFA 네트워크 인터페이스와 관련된 지표를 수집합니다.

헤드 노드에서 스크립트는 Prometheus용 Slurm 내보내기 및 [Prometheus 오픈 소스 소프트웨어](https://prometheus.io/docs/introduction/overview/)를 설치합니다. Slurm 내보내기는 Prometheus에 Slurm 작업, 파티션 및 노드 상태와 관련된 지표를 제공합니다.

수명 주기 스크립트는 모든 내보내기 패키지를 도커 컨테이너로 설치하도록 설계되었으므로 Docker 패키지도 헤드 노드와 컴퓨팅 노드 모두에 설치해야 합니다. 이러한 구성 요소에 대한 스크립트는 *Awsome Distributed Training GitHub 리포지토리*의 [https://github.com/aws-samples/awsome-distributed-training/tree/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/utils](https://github.com/aws-samples/awsome-distributed-training/tree/main/1.architectures/5.sagemaker-hyperpod/LifecycleScripts/base-config/utils) 폴더에 편리하게 제공됩니다.

내보내기 패키지와 함께 설치된 HyperPod 클러스터를 성공적으로 설정한 후 다음 주제로 이동하여 Amazon Managed Service for Prometheus 및 Amazon Managed Grafana 설정을 완료합니다.