Class LinuxGpuBuildImage
A CodeBuild GPU image running Linux.
Inheritance
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LinuxGpuBuildImage : DeputyBase, IBindableBuildImage, IBuildImage
Syntax (vb)
Public Class LinuxGpuBuildImage
Inherits DeputyBase
Implements IBindableBuildImage, IBuildImage
Remarks
This class has public constants that represent the most popular GPU images from AWS Deep Learning Containers.
See: https://aws.amazon.com/releasenotes/available-deep-learning-containers-images
ExampleMetadata: infused
Examples
new Project(this, "Project", new ProjectProps {
Environment = new BuildEnvironment {
BuildImage = LinuxGpuBuildImage.DLC_TENSORFLOW_2_1_0_INFERENCE
}
});
Synopsis
Constructors
LinuxGpuBuildImage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LinuxGpuBuildImage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
DefaultComputeType | The default |
DLC_MXNET_1_4_1 | MXNet 1.4.1 GPU image from AWS Deep Learning Containers. |
DLC_MXNET_1_6_0 | MXNet 1.6.0 GPU image from AWS Deep Learning Containers. |
DLC_PYTORCH_1_2_0 | PyTorch 1.2.0 GPU image from AWS Deep Learning Containers. |
DLC_PYTORCH_1_3_1 | PyTorch 1.3.1 GPU image from AWS Deep Learning Containers. |
DLC_PYTORCH_1_4_0_INFERENCE | PyTorch 1.4.0 GPU inference image from AWS Deep Learning Containers. |
DLC_PYTORCH_1_4_0_TRAINING | PyTorch 1.4.0 GPU training image from AWS Deep Learning Containers. |
DLC_PYTORCH_1_5_0_INFERENCE | PyTorch 1.5.0 GPU inference image from AWS Deep Learning Containers. |
DLC_PYTORCH_1_5_0_TRAINING | PyTorch 1.5.0 GPU training image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_1_14_0 | Tensorflow 1.14.0 GPU image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_1_15_0 | Tensorflow 1.15.0 GPU image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_1_15_2_INFERENCE | Tensorflow 1.15.2 GPU inference image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_1_15_2_TRAINING | Tensorflow 1.15.2 GPU training image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_2_0_0 | Tensorflow 2.0.0 GPU image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_2_0_1 | Tensorflow 2.0.1 GPU image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_2_1_0_INFERENCE | Tensorflow 2.1.0 GPU inference image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_2_1_0_TRAINING | Tensorflow 2.1.0 GPU training image from AWS Deep Learning Containers. |
DLC_TENSORFLOW_2_2_0_TRAINING | Tensorflow 2.2.0 GPU training image from AWS Deep Learning Containers. |
ImageId | The Docker image identifier that the build environment uses. |
ImagePullPrincipalType | The type of principal that CodeBuild will use to pull this build Docker image. |
Type | The type of build environment. |
Methods
AwsDeepLearningContainersImage(String, String, String) | Returns a Linux GPU build image from AWS Deep Learning Containers. |
Bind(Construct, IProject, IBuildImageBindOptions) | Function that allows the build image access to the construct tree. |
FromEcrRepository(IRepository, String) | Returns a GPU image running Linux from an ECR repository. |
RunScriptBuildspec(String) | Make a buildspec to run the indicated script. |
Validate(IBuildEnvironment) | Allows the image a chance to validate whether the passed configuration is correct. |
Constructors
LinuxGpuBuildImage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LinuxGpuBuildImage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LinuxGpuBuildImage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LinuxGpuBuildImage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
DefaultComputeType
The default ComputeType
to use with this image, if one was not specified in BuildEnvironment#computeType
explicitly.
public virtual ComputeType DefaultComputeType { get; }
Property Value
DLC_MXNET_1_4_1
MXNet 1.4.1 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_MXNET_1_4_1 { get; }
Property Value
DLC_MXNET_1_6_0
MXNet 1.6.0 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_MXNET_1_6_0 { get; }
Property Value
DLC_PYTORCH_1_2_0
PyTorch 1.2.0 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_PYTORCH_1_2_0 { get; }
Property Value
DLC_PYTORCH_1_3_1
PyTorch 1.3.1 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_PYTORCH_1_3_1 { get; }
Property Value
DLC_PYTORCH_1_4_0_INFERENCE
PyTorch 1.4.0 GPU inference image from AWS Deep Learning Containers.
public static IBuildImage DLC_PYTORCH_1_4_0_INFERENCE { get; }
Property Value
DLC_PYTORCH_1_4_0_TRAINING
PyTorch 1.4.0 GPU training image from AWS Deep Learning Containers.
public static IBuildImage DLC_PYTORCH_1_4_0_TRAINING { get; }
Property Value
DLC_PYTORCH_1_5_0_INFERENCE
PyTorch 1.5.0 GPU inference image from AWS Deep Learning Containers.
public static IBuildImage DLC_PYTORCH_1_5_0_INFERENCE { get; }
Property Value
DLC_PYTORCH_1_5_0_TRAINING
PyTorch 1.5.0 GPU training image from AWS Deep Learning Containers.
public static IBuildImage DLC_PYTORCH_1_5_0_TRAINING { get; }
Property Value
DLC_TENSORFLOW_1_14_0
Tensorflow 1.14.0 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_1_14_0 { get; }
Property Value
DLC_TENSORFLOW_1_15_0
Tensorflow 1.15.0 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_1_15_0 { get; }
Property Value
DLC_TENSORFLOW_1_15_2_INFERENCE
Tensorflow 1.15.2 GPU inference image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_1_15_2_INFERENCE { get; }
Property Value
DLC_TENSORFLOW_1_15_2_TRAINING
Tensorflow 1.15.2 GPU training image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_1_15_2_TRAINING { get; }
Property Value
DLC_TENSORFLOW_2_0_0
Tensorflow 2.0.0 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_2_0_0 { get; }
Property Value
DLC_TENSORFLOW_2_0_1
Tensorflow 2.0.1 GPU image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_2_0_1 { get; }
Property Value
DLC_TENSORFLOW_2_1_0_INFERENCE
Tensorflow 2.1.0 GPU inference image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_2_1_0_INFERENCE { get; }
Property Value
DLC_TENSORFLOW_2_1_0_TRAINING
Tensorflow 2.1.0 GPU training image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_2_1_0_TRAINING { get; }
Property Value
DLC_TENSORFLOW_2_2_0_TRAINING
Tensorflow 2.2.0 GPU training image from AWS Deep Learning Containers.
public static IBuildImage DLC_TENSORFLOW_2_2_0_TRAINING { get; }
Property Value
ImageId
The Docker image identifier that the build environment uses.
public virtual string ImageId { get; }
Property Value
System.String
ImagePullPrincipalType
The type of principal that CodeBuild will use to pull this build Docker image.
public virtual Nullable<ImagePullPrincipalType> ImagePullPrincipalType { get; }
Property Value
System.Nullable<ImagePullPrincipalType>
Type
The type of build environment.
public virtual string Type { get; }
Property Value
System.String
Methods
AwsDeepLearningContainersImage(String, String, String)
Returns a Linux GPU build image from AWS Deep Learning Containers.
public static IBuildImage AwsDeepLearningContainersImage(string repositoryName, string tag, string account = null)
Parameters
- repositoryName System.String
the name of the repository, for example "pytorch-inference".
- tag System.String
the tag of the image, for example "1.5.0-gpu-py36-cu101-ubuntu16.04".
- account System.String
the AWS account ID where the DLC repository for this region is hosted in.
Returns
Remarks
Bind(Construct, IProject, IBuildImageBindOptions)
Function that allows the build image access to the construct tree.
public virtual IBuildImageConfig Bind(Construct scope, IProject project, IBuildImageBindOptions options)
Parameters
- scope Constructs.Construct
- project IProject
- options IBuildImageBindOptions
Returns
FromEcrRepository(IRepository, String)
Returns a GPU image running Linux from an ECR repository.
public static IBuildImage FromEcrRepository(IRepository repository, string tag = null)
Parameters
- repository IRepository
The ECR repository.
- tag System.String
Image tag (default "latest").
Returns
Remarks
NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image.
See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
RunScriptBuildspec(String)
Make a buildspec to run the indicated script.
public virtual BuildSpec RunScriptBuildspec(string entrypoint)
Parameters
- entrypoint System.String
Returns
Validate(IBuildEnvironment)
Allows the image a chance to validate whether the passed configuration is correct.
public virtual string[] Validate(IBuildEnvironment buildEnvironment)
Parameters
- buildEnvironment IBuildEnvironment
Returns
System.String[]