@aws-cdk_aws-batch-alpha.MultiNodeContainer

interface MultiNodeContainer ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Batch.Alpha.MultiNodeContainer
Gogithub.com/aws/aws-cdk-go/awscdkbatchalpha/v2#MultiNodeContainer
Javasoftware.amazon.awscdk.services.batch.alpha.MultiNodeContainer
Pythonaws_cdk.aws_batch_alpha.MultiNodeContainer
TypeScript (source)@aws-cdk/aws-batch-alpha ยป MultiNodeContainer

Runs the container on nodes [startNode, endNode].

Example

import * as cdk from 'aws-cdk-lib';
const multiNodeJob = new batch.MultiNodeJobDefinition(this, 'JobDefinition', {
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.R4, ec2.InstanceSize.LARGE),
  containers: [{
    container: new batch.EcsEc2ContainerDefinition(this, 'mainMPIContainer', {
      image: ecs.ContainerImage.fromRegistry('yourregsitry.com/yourMPIImage:latest'),
      cpu: 256,
      memory: cdk.Size.mebibytes(2048),
    }),
    startNode: 0,
    endNode: 5,
  }],
});
// convenience method
multiNodeJob.addContainer({
  startNode: 6,
  endNode: 10,
  container: new batch.EcsEc2ContainerDefinition(this, 'multiContainer', {
    image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
    cpu: 256,
    memory: cdk.Size.mebibytes(2048),
  }),
});

Properties

NameTypeDescription
container๐Ÿ”นIEcsContainerDefinitionThe container that this node range will run.
endNode๐Ÿ”นnumberThe index of the last node to run this container.
startNode๐Ÿ”นnumberThe index of the first node to run this container.

container๐Ÿ”น

Type: IEcsContainerDefinition

The container that this node range will run.


endNode๐Ÿ”น

Type: number

The index of the last node to run this container.

The container is run on all nodes in the range [startNode, endNode] (inclusive)


startNode๐Ÿ”น

Type: number

The index of the first node to run this container.

The container is run on all nodes in the range [startNode, endNode] (inclusive)