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
demandé il y a un mois286 vues
1 réponse
0
Réponse acceptée

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
répondu il y a un mois
profile pictureAWS
EXPERT
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions