BatchContainerOverrides

class aws_cdk.aws_stepfunctions_tasks.BatchContainerOverrides(*, 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 (Optional[Size]) – Memory reserved for the job. Default: - No memory overrides. The memory supplied in the job definition will be used.

  • 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.
import aws_cdk as cdk
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

# instance_type: ec2.InstanceType
# size: cdk.Size

batch_container_overrides = stepfunctions_tasks.BatchContainerOverrides(
    command=["command"],
    environment={
        "environment_key": "environment"
    },
    gpu_count=123,
    instance_type=instance_type,
    memory=size,
    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

Memory reserved for the job.

Default:
  • No memory overrides. The memory supplied in the job definition will be used.

vcpus

The number of vCPUs to reserve for the container.

This value overrides the value set in the job definition.

Default:
  • No vCPUs overrides