Show / Hide Table of Contents

Class MultiNodeContainer

Runs the container on nodes [startNode, endNode].

Inheritance
object
MultiNodeContainer
Implements
IMultiNodeContainer
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class MultiNodeContainer : IMultiNodeContainer
Syntax (vb)
Public Class MultiNodeContainer Implements 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

Constructors

MultiNodeContainer()

Runs the container on nodes [startNode, endNode].

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.

Constructors

MultiNodeContainer()

Runs the container on nodes [startNode, endNode].

public MultiNodeContainer()
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)
                })
            });

Properties

Container

The container that this node range will run.

public IEcsContainerDefinition Container { get; set; }
Property Value

IEcsContainerDefinition

Remarks

ExampleMetadata: infused

EndNode

The index of the last node to run this container.

public double EndNode { get; set; }
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.

public double StartNode { get; set; }
Property Value

double

Remarks

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

Implements

IMultiNodeContainer
Back to top Generated by DocFX