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
asked a month ago273 views
1 Answer
0
Accepted Answer

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
EXPERT
answered a month ago
profile pictureAWS
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions