Class LinuxGpuBuildImage

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codebuild.LinuxGpuBuildImage
All Implemented Interfaces:
IBindableBuildImage, IBuildImage, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:27.042Z") @Stability(Stable) public class LinuxGpuBuildImage extends software.amazon.jsii.JsiiObject implements IBindableBuildImage
A CodeBuild GPU image running Linux.

This class has public constants that represent the most popular GPU images from AWS Deep Learning Containers.

Example:

 Project.Builder.create(this, "Project")
         .environment(BuildEnvironment.builder()
                 .buildImage(LinuxGpuBuildImage.DLC_TENSORFLOW_2_1_0_INFERENCE)
                 .build())
         .build();
 

See Also:
  • Field Details

    • DLC_MXNET_1_4_1

      @Stability(Stable) public static final IBuildImage DLC_MXNET_1_4_1
      MXNet 1.4.1 GPU image from AWS Deep Learning Containers.
    • DLC_MXNET_1_6_0

      @Stability(Stable) public static final IBuildImage DLC_MXNET_1_6_0
      MXNet 1.6.0 GPU image from AWS Deep Learning Containers.
    • DLC_PYTORCH_1_2_0

      @Stability(Stable) public static final IBuildImage DLC_PYTORCH_1_2_0
      PyTorch 1.2.0 GPU image from AWS Deep Learning Containers.
    • DLC_PYTORCH_1_3_1

      @Stability(Stable) public static final IBuildImage DLC_PYTORCH_1_3_1
      PyTorch 1.3.1 GPU image from AWS Deep Learning Containers.
    • DLC_PYTORCH_1_4_0_INFERENCE

      @Stability(Stable) public static final IBuildImage DLC_PYTORCH_1_4_0_INFERENCE
      PyTorch 1.4.0 GPU inference image from AWS Deep Learning Containers.
    • DLC_PYTORCH_1_4_0_TRAINING

      @Stability(Stable) public static final IBuildImage DLC_PYTORCH_1_4_0_TRAINING
      PyTorch 1.4.0 GPU training image from AWS Deep Learning Containers.
    • DLC_PYTORCH_1_5_0_INFERENCE

      @Stability(Stable) public static final IBuildImage DLC_PYTORCH_1_5_0_INFERENCE
      PyTorch 1.5.0 GPU inference image from AWS Deep Learning Containers.
    • DLC_PYTORCH_1_5_0_TRAINING

      @Stability(Stable) public static final IBuildImage DLC_PYTORCH_1_5_0_TRAINING
      PyTorch 1.5.0 GPU training image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_1_14_0

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_1_14_0
      Tensorflow 1.14.0 GPU image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_1_15_0

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_1_15_0
      Tensorflow 1.15.0 GPU image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_1_15_2_INFERENCE

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_1_15_2_INFERENCE
      Tensorflow 1.15.2 GPU inference image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_1_15_2_TRAINING

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_1_15_2_TRAINING
      Tensorflow 1.15.2 GPU training image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_2_0_0

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_2_0_0
      Tensorflow 2.0.0 GPU image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_2_0_1

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_2_0_1
      Tensorflow 2.0.1 GPU image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_2_1_0_INFERENCE

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_2_1_0_INFERENCE
      Tensorflow 2.1.0 GPU inference image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_2_1_0_TRAINING

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_2_1_0_TRAINING
      Tensorflow 2.1.0 GPU training image from AWS Deep Learning Containers.
    • DLC_TENSORFLOW_2_2_0_TRAINING

      @Stability(Stable) public static final IBuildImage DLC_TENSORFLOW_2_2_0_TRAINING
      Tensorflow 2.2.0 GPU training image from AWS Deep Learning Containers.
  • Constructor Details

    • LinuxGpuBuildImage

      protected LinuxGpuBuildImage(software.amazon.jsii.JsiiObjectRef objRef)
    • LinuxGpuBuildImage

      protected LinuxGpuBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • awsDeepLearningContainersImage

      @Stability(Stable) @NotNull public static IBuildImage awsDeepLearningContainersImage(@NotNull String repositoryName, @NotNull String tag, @Nullable String account)
      Returns a Linux GPU build image from AWS Deep Learning Containers.

      Parameters:
      repositoryName - the name of the repository, for example "pytorch-inference". This parameter is required.
      tag - the tag of the image, for example "1.5.0-gpu-py36-cu101-ubuntu16.04". This parameter is required.
      account - the AWS account ID where the DLC repository for this region is hosted in.
      See Also:
    • awsDeepLearningContainersImage

      @Stability(Stable) @NotNull public static IBuildImage awsDeepLearningContainersImage(@NotNull String repositoryName, @NotNull String tag)
      Returns a Linux GPU build image from AWS Deep Learning Containers.

      Parameters:
      repositoryName - the name of the repository, for example "pytorch-inference". This parameter is required.
      tag - the tag of the image, for example "1.5.0-gpu-py36-cu101-ubuntu16.04". This parameter is required.
      See Also:
    • fromEcrRepository

      @Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tag)
      Returns a GPU image running Linux from an ECR repository.

      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.

      Parameters:
      repository - The ECR repository. This parameter is required.
      tag - Image tag (default "latest").
      See Also:
    • fromEcrRepository

      @Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository)
      Returns a GPU image running Linux from an ECR repository.

      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.

      Parameters:
      repository - The ECR repository. This parameter is required.
      See Also:
    • bind

      @Stability(Stable) @NotNull public BuildImageConfig bind(@NotNull software.constructs.Construct scope, @NotNull IProject project, @NotNull BuildImageBindOptions _options)
      Function that allows the build image access to the construct tree.

      Specified by:
      bind in interface IBindableBuildImage
      Parameters:
      scope - This parameter is required.
      project - This parameter is required.
      _options - This parameter is required.
    • runScriptBuildspec

      @Stability(Stable) @NotNull public BuildSpec runScriptBuildspec(@NotNull String entrypoint)
      Make a buildspec to run the indicated script.

      Specified by:
      runScriptBuildspec in interface IBuildImage
      Parameters:
      entrypoint - This parameter is required.
    • validate

      @Stability(Stable) @NotNull public List<String> validate(@NotNull BuildEnvironment buildEnvironment)
      Allows the image a chance to validate whether the passed configuration is correct.

      Specified by:
      validate in interface IBuildImage
      Parameters:
      buildEnvironment - This parameter is required.
    • getDefaultComputeType

      @Stability(Stable) @NotNull public ComputeType getDefaultComputeType()
      The default ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.
      Specified by:
      getDefaultComputeType in interface IBuildImage
    • getImageId

      @Stability(Stable) @NotNull public String getImageId()
      The Docker image identifier that the build environment uses.
      Specified by:
      getImageId in interface IBuildImage
      See Also:
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of build environment.
      Specified by:
      getType in interface IBuildImage
    • getImagePullPrincipalType

      @Stability(Stable) @Nullable public ImagePullPrincipalType getImagePullPrincipalType()
      The type of principal that CodeBuild will use to pull this build Docker image.
      Specified by:
      getImagePullPrincipalType in interface IBuildImage