Skip to content

NvidiaMpsAllocation

Source code in docs_src/capo_ecs/types/nvidia_mps_allocation.py
class NvidiaMpsAllocation(TypedDict, closed=True):
    memory: "capo_ecs.types.boxed_integer.BoxedInteger"
    """<p>The amount of GPU memory, in MiB, to allocate to the container. Amazon ECS assigns the container a GPU that has at least the specified amount of memory available, and sets the <code>CUDA_MPS_PINNED_DEVICE_MEM_LIMIT</code> environment variable in the container to limit its memory to this amount. The memory must be available on a single GPU. If more than one container in a task uses <code>nvidiaMps</code>, Amazon ECS assigns them the same GPU, which must have enough memory available for all of them.</p>"""
    max_compute_percent: NotRequired["capo_ecs.types.boxed_integer.BoxedInteger"]
    """<p>The maximum percentage of the GPU's compute capacity that the container can use. Amazon ECS sets the <code>CUDA_MPS_ACTIVE_THREAD_PERCENTAGE</code> environment variable in the container to this value. This value is a limit, not a reservation.</p> <p>If you don't specify this parameter, Amazon ECS doesn't set <code>CUDA_MPS_ACTIVE_THREAD_PERCENTAGE</code>, and the active thread percentage of the MPS server on the container instance applies. By default, this is 100 percent.</p>"""

max_compute_percent instance-attribute

max_compute_percent: NotRequired[BoxedInteger]

The maximum percentage of the GPU's compute capacity that the container can use. Amazon ECS sets the CUDA_MPS_ACTIVE_THREAD_PERCENTAGE environment variable in the container to this value. This value is a limit, not a reservation.

If you don't specify this parameter, Amazon ECS doesn't set CUDA_MPS_ACTIVE_THREAD_PERCENTAGE, and the active thread percentage of the MPS server on the container instance applies. By default, this is 100 percent.

memory instance-attribute

memory: BoxedInteger

The amount of GPU memory, in MiB, to allocate to the container. Amazon ECS assigns the container a GPU that has at least the specified amount of memory available, and sets the CUDA_MPS_PINNED_DEVICE_MEM_LIMIT environment variable in the container to limit its memory to this amount. The memory must be available on a single GPU. If more than one container in a task uses nvidiaMps, Amazon ECS assigns them the same GPU, which must have enough memory available for all of them.