Run ecs task definition has error RESOURCE:GPU AGENT

0

I run ecs task with gpu container instance

In task definition i add gpu to resourceRequirements with ec2 gpu for example when i run task with p2.xlarge value of gpu will be 1

I guess my instance does not have enough remaining gpu. Is any way for calculate remaining gpu for create task definition?

Thanks!!

MinhGEM
質問済み 1ヶ月前286ビュー
1回答
0
承認された回答

You can use the AWS CLI to describe your ECS container instances and extract the relevant information. For example you can do this:

  1. Use the AWS CLI to list the ARNs of the container instances in your cluster.

    aws ecs list-container-instances --cluster <cluster-name>
  2. Use the ARNs from the previous step to get detailed information about each instance.

    aws ecs describe-container-instances --cluster <cluster-name> --container-instances <instance-arn-1> <instance-arn-2> ...
  3. From the output, extract the total and remaining GPUs for each instance. Look for the registeredResources and remainingResources sections, specifically for entries where the name is GPU.

  4. Subtract the number of GPUs in use from the total number of GPUs to determine the remaining GPUs available for allocation.

Here you can see an example of the output.

profile picture
エキスパート
回答済み 1ヶ月前
profile pictureAWS
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ