# LinuxGpuBuildImage

A CodeBuild GPU image running Linux.

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

Extends: LinuxGpuBuildImage
Implements: IBindableBuildImage, IBuildImage

- Source: [`aws-codebuild/lib/linux-gpu-build-image.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-codebuild/lib/linux-gpu-build-image.ts#L25)

## Example

```ts
new codebuild.Project(this, 'Project', {
  environment: {
    buildImage: codebuild.LinuxGpuBuildImage.DLC_TENSORFLOW_2_1_0_INFERENCE,
  },
  // ...
})
```

## Properties

- `defaultComputeType`: [ComputeType](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.ComputeType.html) (required) — The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly.

- `DLC_MXNET_1_4_1`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — MXNet 1.4.1 GPU image from AWS Deep Learning Containers.

- `DLC_MXNET_1_6_0`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — MXNet 1.6.0 GPU image from AWS Deep Learning Containers.

- `DLC_PYTORCH_1_2_0`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — PyTorch 1.2.0 GPU image from AWS Deep Learning Containers.

- `DLC_PYTORCH_1_3_1`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — PyTorch 1.3.1 GPU image from AWS Deep Learning Containers.

- `DLC_PYTORCH_1_4_0_INFERENCE`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — PyTorch 1.4.0 GPU inference image from AWS Deep Learning Containers.

- `DLC_PYTORCH_1_4_0_TRAINING`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — PyTorch 1.4.0 GPU training image from AWS Deep Learning Containers.

- `DLC_PYTORCH_1_5_0_INFERENCE`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — PyTorch 1.5.0 GPU inference image from AWS Deep Learning Containers.

- `DLC_PYTORCH_1_5_0_TRAINING`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — PyTorch 1.5.0 GPU training image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_1_14_0`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 1.14.0 GPU image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_1_15_0`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 1.15.0 GPU image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_1_15_2_INFERENCE`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 1.15.2 GPU inference image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_1_15_2_TRAINING`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 1.15.2 GPU training image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_2_0_0`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 2.0.0 GPU image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_2_0_1`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 2.0.1 GPU image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_2_1_0_INFERENCE`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 2.1.0 GPU inference image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_2_1_0_TRAINING`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 2.1.0 GPU training image from AWS Deep Learning Containers.

- `DLC_TENSORFLOW_2_2_0_TRAINING`: [IBuildImage](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.IBuildImage.html) (required) (static) — Tensorflow 2.2.0 GPU training image from AWS Deep Learning Containers.

- `imageId`: string (required) — The Docker image identifier that the build environment uses.

- `imagePullPrincipalType`: [ImagePullPrincipalType](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.ImagePullPrincipalType.html) — The type of principal that CodeBuild will use to pull this build Docker image.

- `type`: string (required) — The type of build environment.

## Methods

- `awsDeepLearningContainersImage(repositoryName: string, tag: string, account?: string): IBuildImage` (static) — Returns a Linux GPU build image from AWS Deep Learning Containers.

  **Parameters**

  - `repositoryName` — the name of the repository, for example "pytorch-inference".
  - `tag` — the tag of the image, for example "1.5.0-gpu-py36-cu101-ubuntu16.04".
  - `account` — the AWS account ID where the DLC repository for this region is hosted in.

- `bind(scope: Construct, project: IProject, _options: BuildImageBindOptions): BuildImageConfig` — Function that allows the build image access to the construct tree.

- `fromEcrRepository(repository: IRepository, tag?: string): IBuildImage` (static) — 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.
  - `tag` — Image tag (default "latest").

- `runScriptBuildspec(entrypoint: string): BuildSpec` — Make a buildspec to run the indicated script.

- `validate(buildEnvironment: BuildEnvironment): string[]` — Allows the image a chance to validate whether the passed configuration is correct.
