progre55
10/18/2024, 9:17 AMresourceRequirements: [{"type": "GPU", "value": N}]
into my task-definition. Otherwise the container running in ECS Task does not see the GPUs.
Is there a way to dynamically pass in "resourceRequirements" to a deployment, for example, using job_variables
? Or, any other ways?progre55
10/18/2024, 9:18 AMtask-definition
with resourceRequirements
in it, and it works. However, then it's not dynamic enough. I would like to set the number of GPUs based on my flowQTai
11/15/2024, 7:31 AMprogre55
11/15/2024, 8:39 AMvariables:properties:
"resource_requirements": {
"type": "object",
"title": "Resource Requirements",
"default": {},
"description": "Resource requirements to pass to the task run request. For example, to specify a GPU on a task, you can pass `{ \"resource_requirements\": [ { \"type\": \"GPU\", \"value\": \"1\" } ] }`"
},
and adding the following to `job_configurationtask run requestcontainerOverrides`:
"resourceRequirements": "{{ resource_requirements }}"
progre55
11/15/2024, 8:42 AMprefect.yaml
- name: some_deployment
work_pool: my_fixed_work_pool
... other options
job_variables:
... other options
resource_requirements:
- type: GPU
value: '1' #or, as many as you might need, but not more than what you have available
progre55
11/15/2024, 8:44 AMlaunch_type: EC2
in job_variables
progre55
11/15/2024, 8:44 AMQTai
11/15/2024, 2:00 PM