Interface IMultiNodeJobDefinitionProps
Props to configure a MultiNodeJobDefinition.
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IMultiNodeJobDefinitionProps : IJobDefinitionProps
Syntax (vb)
Public Interface IMultiNodeJobDefinitionProps Inherits IJobDefinitionProps
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
Properties
| Containers | The containers that this multinode job will run. |
| InstanceType | The instance type that this job definition will run. |
| MainNode | The index of the main node in this job. |
| PropagateTags | Whether to propagate tags from the JobDefinition to the ECS task that Batch spawns. |
Properties
Containers
The containers that this multinode job will run.
IMultiNodeContainer[]? Containers { get; }
Property Value
Remarks
InstanceType
The instance type that this job definition will run.
InstanceType? InstanceType { get; }
Property Value
Remarks
Default: - optimal instance, selected by Batch
MainNode
The index of the main node in this job.
double? MainNode { get; }
Property Value
Remarks
The main node is responsible for orchestration.
Default: 0
PropagateTags
Whether to propagate tags from the JobDefinition to the ECS task that Batch spawns.
bool? PropagateTags { get; }
Property Value
bool?
Remarks
Default: false