ContainerOverrides

class aws_cdk.aws_stepfunctions_tasks.ContainerOverrides(*, command=None, environment=None, gpu_count=None, instance_type=None, memory=None, vcpus=None)

Bases: object

The overrides that should be sent to a container.

Parameters:
  • command (Optional[Sequence[str]]) – The command to send to the container that overrides the default command from the Docker image or the job definition. Default: - No command overrides

  • environment (Optional[Mapping[str, str]]) – The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition. Default: - No environment overrides

  • gpu_count (Union[int, float, None]) – The number of physical GPUs to reserve for the container. The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on. Default: - No GPU reservation

  • instance_type (Optional[InstanceType]) – The instance type to use for a multi-node parallel job. This parameter is not valid for single-node container jobs. Default: - No instance type overrides

  • memory (Union[int, float, None]) – The number of MiB of memory reserved for the job. This value overrides the value set in the job definition. Default: - No memory overrides

  • vcpus (Union[int, float, None]) – The number of vCPUs to reserve for the container. This value overrides the value set in the job definition. Default: - No vCPUs overrides

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

# instance_type: ec2.InstanceType

container_overrides = stepfunctions_tasks.ContainerOverrides(
    command=["command"],
    environment={
        "environment_key": "environment"
    },
    gpu_count=123,
    instance_type=instance_type,
    memory=123,
    vcpus=123
)

Attributes

command

The command to send to the container that overrides the default command from the Docker image or the job definition.

Default:
  • No command overrides

environment

The environment variables to send to the container.

You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition.

Default:
  • No environment overrides

gpu_count

The number of physical GPUs to reserve for the container.

The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.

Default:
  • No GPU reservation

instance_type

The instance type to use for a multi-node parallel job.

This parameter is not valid for single-node container jobs.

Default:
  • No instance type overrides

memory

The number of MiB of memory reserved for the job.

This value overrides the value set in the job definition.

Default:
  • No memory overrides

vcpus

The number of vCPUs to reserve for the container.

This value overrides the value set in the job definition.

Default:
  • No vCPUs overrides