Interface IEcsEc2ContainerDefinitionProps
Props to configure an EcsEc2ContainerDefinition.
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IEcsEc2ContainerDefinitionProps : IEcsContainerDefinitionProps
Syntax (vb)
Public Interface IEcsEc2ContainerDefinitionProps
Inherits IEcsContainerDefinitionProps
Remarks
ExampleMetadata: infused
Examples
IVpc vpc;
var ecsJob = new EcsJobDefinition(this, "JobDefn", new EcsJobDefinitionProps {
Container = new EcsEc2ContainerDefinition(this, "containerDefn", new EcsEc2ContainerDefinitionProps {
Image = ContainerImage.FromRegistry("public.ecr.aws/amazonlinux/amazonlinux:latest"),
Memory = Size.Mebibytes(2048),
Cpu = 256
})
});
var queue = new JobQueue(this, "JobQueue", new JobQueueProps {
ComputeEnvironments = new [] { new OrderedComputeEnvironment {
ComputeEnvironment = new ManagedEc2EcsComputeEnvironment(this, "managedEc2CE", new ManagedEc2EcsComputeEnvironmentProps {
Vpc = vpc
}),
Order = 1
} },
Priority = 10
});
var user = new User(this, "MyUser");
ecsJob.GrantSubmitJob(user, queue);
Synopsis
Properties
Gpu | The number of physical GPUs to reserve for the container. |
Privileged | When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user). |
Ulimits | Limits to set for the user this docker container will run as. |
Properties
Gpu
The number of physical GPUs to reserve for the container.
virtual Nullable<double> Gpu { get; }
Property Value
System.
Remarks
Make sure that the number of GPUs reserved for all containers in a job doesn't exceed the number of available GPUs on the compute resource that the job is launched on.
Default: - no gpus
Privileged
When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user).
virtual Nullable<bool> Privileged { get; }
Property Value
System.
Remarks
Default: false
Ulimits
Limits to set for the user this docker container will run as.
virtual IUlimit[] Ulimits { get; }
Property Value
IUlimit[]
Remarks
Default: - no ulimits