Show / Hide Table of Contents

Interface IMultiNodeContainer

Runs the container on nodes [startNode, endNode].

Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IMultiNodeContainer
Syntax (vb)
Public Interface IMultiNodeContainer
Remarks

ExampleMetadata: infused

Examples
var multiNodeJob = new MultiNodeJobDefinition(this, "JobDefinition", new MultiNodeJobDefinitionProps {
                InstanceType = InstanceType.Of(InstanceClass.R4, InstanceSize.LARGE),  // optional, omit to let Batch choose the type for you
                Containers = new [] { new MultiNodeContainer {
                    Container = new EcsEc2ContainerDefinition(this, "mainMPIContainer", new EcsEc2ContainerDefinitionProps {
                        Image = ContainerImage.FromRegistry("yourregsitry.com/yourMPIImage:latest"),
                        Cpu = 256,
                        Memory = Size.Mebibytes(2048)
                    }),
                    StartNode = 0,
                    EndNode = 5
                } }
            });
            // convenience method
            multiNodeJob.AddContainer(new MultiNodeContainer {
                StartNode = 6,
                EndNode = 10,
                Container = new EcsEc2ContainerDefinition(this, "multiContainer", new EcsEc2ContainerDefinitionProps {
                    Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample"),
                    Cpu = 256,
                    Memory = Size.Mebibytes(2048)
                })
            });

Synopsis

Properties

Container

The container that this node range will run.

EndNode

The index of the last node to run this container.

StartNode

The index of the first node to run this container.

Properties

Container

The container that this node range will run.

IEcsContainerDefinition Container { get; }
Property Value

IEcsContainerDefinition

Remarks

ExampleMetadata: infused

EndNode

The index of the last node to run this container.

double EndNode { get; }
Property Value

double

Remarks

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

StartNode

The index of the first node to run this container.

double StartNode { get; }
Property Value

double

Remarks

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

Back to top Generated by DocFX