Interface MultiNodeJobDefinitionProps

All Superinterfaces:
JobDefinitionProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
MultiNodeJobDefinitionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-15T10:24:55.487Z") @Stability(Stable) public interface MultiNodeJobDefinitionProps extends software.amazon.jsii.JsiiSerializable, JobDefinitionProps
Props to configure a MultiNodeJobDefinition.

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());