Interface MultiNodeContainer
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
MultiNodeContainer.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-12-01T16:02:15.286Z")
@Stability(Stable)
public interface MultiNodeContainer
extends software.amazon.jsii.JsiiSerializable
Runs the container on nodes [startNode, endNode].
Example:
MultiNodeJobDefinition multiNodeJob = MultiNodeJobDefinition.Builder.create(this, "JobDefinition")
.instanceType(InstanceType.of(InstanceClass.R4, InstanceSize.LARGE)) // optional, omit to let Batch choose the type for you
.containers(List.of(MultiNodeContainer.builder()
.container(EcsEc2ContainerDefinition.Builder.create(this, "mainMPIContainer")
.image(ContainerImage.fromRegistry("yourregsitry.com/yourMPIImage:latest"))
.cpu(256)
.memory(Size.mebibytes(2048))
.build())
.startNode(0)
.endNode(5)
.build()))
.build();
// convenience method
multiNodeJob.addContainer(MultiNodeContainer.builder()
.startNode(6)
.endNode(10)
.container(EcsEc2ContainerDefinition.Builder.create(this, "multiContainer")
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.cpu(256)
.memory(Size.mebibytes(2048))
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forMultiNodeContainerstatic final classAn implementation forMultiNodeContainer -
Method Summary
Modifier and TypeMethodDescriptionstatic MultiNodeContainer.Builderbuilder()The container that this node range will run.The index of the last node to run this container.The index of the first node to run this container.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainer
The container that this node range will run. -
getEndNode
The index of the last node to run this container.The container is run on all nodes in the range [startNode, endNode] (inclusive)
-
getStartNode
The index of the first node to run this container.The container is run on all nodes in the range [startNode, endNode] (inclusive)
-
builder
- Returns:
- a
MultiNodeContainer.BuilderofMultiNodeContainer
-