

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# SageMaker HyperPod クラスターの作成
<a name="sagemaker-hyperpod-multihead-slurm-create"></a>

必要なすべてのリソースを設定し、スクリプトを Amazon S3 バケットにアップロードしたら、クラスターを作成できます。

1. クラスターを作成するには、 [https://docs.aws.amazon.com//cli/latest/reference/sagemaker/create-cluster.html](https://docs.aws.amazon.com//cli/latest/reference/sagemaker/create-cluster.html) AWS CLI コマンドを実行します。作成プロセスには、最大 15 分かかる場合があります。

   ```
   aws --region $REGION sagemaker create-cluster \
       --cluster-name $HP_CLUSTER_NAME \
       --vpc-config '{
           "SecurityGroupIds":["'$SECURITY_GROUP'"],
           "Subnets":["'$PRIMARY_SUBNET'", "'$BACKUP_SUBNET'"]
       }' \
       --instance-groups '[{                  
       "InstanceGroupName": "'$CONTOLLER_IG_NAME'",
       "InstanceType": "ml.t3.medium",
       "InstanceCount": 2,
       "LifeCycleConfig": {
           "SourceS3Uri": "s3://'$BUCKET_NAME'",
           "OnCreate": "on_create.sh"
       },
       "ExecutionRole": "'$SLURM_EXECUTION_ROLE_ARN'",
       "ThreadsPerCore": 1
   },
   {
       "InstanceGroupName": "'$COMPUTE_IG_NAME'",          
       "InstanceType": "ml.c5.xlarge",
       "InstanceCount": 2,
       "LifeCycleConfig": {
           "SourceS3Uri": "s3://'$BUCKET_NAME'",
           "OnCreate": "on_create.sh"
       },
       "ExecutionRole": "'$COMPUTE_NODE_ROLE'",
       "ThreadsPerCore": 1
   }]'
   ```

   実行が正常に完了すると、コマンドは次のようなクラスター ARN を返します。

   ```
   {
       "ClusterArn": "arn:aws:sagemaker:us-east-1:111122223333:cluster/cluster_id"
   }
   ```

1. (オプション) クラスターのステータスを確認するには、SageMaker AI コンソール ([https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)) を使用できます。左側のナビゲーションから **[HyperPod クラスター]** を選択し、**[クラスターの管理]** をクリックします。クラスターの名前を選択して、クラスターの詳細ページを開きます。クラスターが正常に作成されていると、クラスターのステータスが **[InService]** と表示されます。  
![\[Amazon SageMaker AI コンソールに複数のコントローラーノードがある HyperPod Slurm クラスターを示す画像\]](http://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/images/hyperpod/hyperpod-lifecycle-multihead-cluster.png)