Interface MultiNodeContainer
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
MultiNodeContainer.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:57.762Z")
@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
Modifier and TypeInterfaceDescriptionstatic final class
A builder forMultiNodeContainer
static final class
An implementation forMultiNodeContainer
-
Method Summary
Modifier and TypeMethodDescriptionstatic MultiNodeContainer.Builder
builder()
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.Builder
ofMultiNodeContainer
-