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
gefragt vor einem Monat287 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor einem Monat
profile pictureAWS
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen