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 個月前檢視次數 287 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南