Class MultiNodeContainer
Runs the container on nodes [startNode, endNode].
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class MultiNodeContainer : Object, IMultiNodeContainer
Syntax (vb)
Public Class MultiNodeContainer
Inherits Object
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
Multi |
Properties
Container | The container that this node range will run. |
End |
The index of the last node to run this container. |
Start |
The index of the first node to run this container. |
Constructors
MultiNodeContainer()
public MultiNodeContainer()
Properties
Container
The container that this node range will run.
public IEcsContainerDefinition Container { get; set; }
Property Value
EndNode
The index of the last node to run this container.
public double EndNode { get; set; }
Property Value
System.
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
System.
Remarks
The container is run on all nodes in the range [startNode, endNode] (inclusive)