Class: AWSCDK::CodeBuild::LinuxGpuBuildImage
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CodeBuild::LinuxGpuBuildImage
- Includes:
- IBindableBuildImage
- Defined in:
- code_build/linux_gpu_build_image.rb
Overview
A CodeBuild GPU image running Linux.
This class has public constants that represent the most popular GPU images from AWS Deep Learning Containers.
Class Method Summary collapse
-
.aws_deep_learning_containers_image(repository_name, tag, account = nil) ⇒ AWSCDK::CodeBuild::IBuildImage
Returns a Linux GPU build image from AWS Deep Learning Containers.
-
.DLC_MXNET_1_4_1 ⇒ AWSCDK::CodeBuild::IBuildImage
MXNet 1.4.1 GPU image from AWS Deep Learning Containers.
-
.DLC_MXNET_1_6_0 ⇒ AWSCDK::CodeBuild::IBuildImage
MXNet 1.6.0 GPU image from AWS Deep Learning Containers.
-
.DLC_PYTORCH_1_2_0 ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.2.0 GPU image from AWS Deep Learning Containers.
-
.DLC_PYTORCH_1_3_1 ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.3.1 GPU image from AWS Deep Learning Containers.
-
.DLC_PYTORCH_1_4_0_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.4.0 GPU inference image from AWS Deep Learning Containers.
-
.DLC_PYTORCH_1_4_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.4.0 GPU training image from AWS Deep Learning Containers.
-
.DLC_PYTORCH_1_5_0_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.5.0 GPU inference image from AWS Deep Learning Containers.
-
.DLC_PYTORCH_1_5_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.5.0 GPU training image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_1_14_0 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.14.0 GPU image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_1_15_0 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.15.0 GPU image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_1_15_2_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.15.2 GPU inference image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_1_15_2_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.15.2 GPU training image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_2_0_0 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.0.0 GPU image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_2_0_1 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.0.1 GPU image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_2_1_0_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.1.0 GPU inference image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_2_1_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.1.0 GPU training image from AWS Deep Learning Containers.
-
.DLC_TENSORFLOW_2_2_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.2.0 GPU training image from AWS Deep Learning Containers.
-
.from_ecr_repository(repository, tag = nil) ⇒ AWSCDK::CodeBuild::IBuildImage
Returns a GPU image running Linux from an ECR repository.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#bind(scope, project, _options) ⇒ AWSCDK::CodeBuild::BuildImageConfig
Function that allows the build image access to the construct tree.
-
#default_compute_type ⇒ AWSCDK::CodeBuild::ComputeType
The default
ComputeTypeto use with this image, if one was not specified inBuildEnvironment#computeTypeexplicitly. -
#image_id ⇒ String
The Docker image identifier that the build environment uses.
-
#image_pull_principal_type ⇒ AWSCDK::CodeBuild::ImagePullPrincipalType?
The type of principal that CodeBuild will use to pull this build Docker image.
-
#initialize(*args) ⇒ LinuxGpuBuildImage
constructor
A new instance of LinuxGpuBuildImage.
-
#run_script_buildspec(entrypoint) ⇒ AWSCDK::CodeBuild::BuildSpec
Make a buildspec to run the indicated script.
-
#type ⇒ String
The type of build environment.
-
#validate(build_environment) ⇒ Array<String>
Allows the image a chance to validate whether the passed configuration is correct.
Constructor Details
#initialize(*args) ⇒ LinuxGpuBuildImage
Returns a new instance of LinuxGpuBuildImage.
13 14 15 |
# File 'code_build/linux_gpu_build_image.rb', line 13 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.aws_deep_learning_containers_image(repository_name, tag, account = nil) ⇒ AWSCDK::CodeBuild::IBuildImage
Returns a Linux GPU build image from AWS Deep Learning Containers.
36 37 38 39 40 41 |
# File 'code_build/linux_gpu_build_image.rb', line 36 def self.aws_deep_learning_containers_image(repository_name, tag, account = nil) Jsii::Type.check_type(repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName") Jsii::Type.check_type(tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tag") Jsii::Type.check_type(account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "account") unless account.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "awsDeepLearningContainersImage", [repository_name, tag, account]) end |
.DLC_MXNET_1_4_1 ⇒ AWSCDK::CodeBuild::IBuildImage
MXNet 1.4.1 GPU image from AWS Deep Learning Containers.
61 62 63 |
# File 'code_build/linux_gpu_build_image.rb', line 61 def self.DLC_MXNET_1_4_1() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_MXNET_1_4_1") end |
.DLC_MXNET_1_6_0 ⇒ AWSCDK::CodeBuild::IBuildImage
MXNet 1.6.0 GPU image from AWS Deep Learning Containers.
68 69 70 |
# File 'code_build/linux_gpu_build_image.rb', line 68 def self.DLC_MXNET_1_6_0() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_MXNET_1_6_0") end |
.DLC_PYTORCH_1_2_0 ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.2.0 GPU image from AWS Deep Learning Containers.
75 76 77 |
# File 'code_build/linux_gpu_build_image.rb', line 75 def self.DLC_PYTORCH_1_2_0() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_PYTORCH_1_2_0") end |
.DLC_PYTORCH_1_3_1 ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.3.1 GPU image from AWS Deep Learning Containers.
82 83 84 |
# File 'code_build/linux_gpu_build_image.rb', line 82 def self.DLC_PYTORCH_1_3_1() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_PYTORCH_1_3_1") end |
.DLC_PYTORCH_1_4_0_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.4.0 GPU inference image from AWS Deep Learning Containers.
89 90 91 |
# File 'code_build/linux_gpu_build_image.rb', line 89 def self.DLC_PYTORCH_1_4_0_INFERENCE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_PYTORCH_1_4_0_INFERENCE") end |
.DLC_PYTORCH_1_4_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.4.0 GPU training image from AWS Deep Learning Containers.
96 97 98 |
# File 'code_build/linux_gpu_build_image.rb', line 96 def self.DLC_PYTORCH_1_4_0_TRAINING() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_PYTORCH_1_4_0_TRAINING") end |
.DLC_PYTORCH_1_5_0_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.5.0 GPU inference image from AWS Deep Learning Containers.
103 104 105 |
# File 'code_build/linux_gpu_build_image.rb', line 103 def self.DLC_PYTORCH_1_5_0_INFERENCE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_PYTORCH_1_5_0_INFERENCE") end |
.DLC_PYTORCH_1_5_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
PyTorch 1.5.0 GPU training image from AWS Deep Learning Containers.
110 111 112 |
# File 'code_build/linux_gpu_build_image.rb', line 110 def self.DLC_PYTORCH_1_5_0_TRAINING() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_PYTORCH_1_5_0_TRAINING") end |
.DLC_TENSORFLOW_1_14_0 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.14.0 GPU image from AWS Deep Learning Containers.
117 118 119 |
# File 'code_build/linux_gpu_build_image.rb', line 117 def self.DLC_TENSORFLOW_1_14_0() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_1_14_0") end |
.DLC_TENSORFLOW_1_15_0 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.15.0 GPU image from AWS Deep Learning Containers.
124 125 126 |
# File 'code_build/linux_gpu_build_image.rb', line 124 def self.DLC_TENSORFLOW_1_15_0() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_1_15_0") end |
.DLC_TENSORFLOW_1_15_2_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.15.2 GPU inference image from AWS Deep Learning Containers.
131 132 133 |
# File 'code_build/linux_gpu_build_image.rb', line 131 def self.DLC_TENSORFLOW_1_15_2_INFERENCE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_1_15_2_INFERENCE") end |
.DLC_TENSORFLOW_1_15_2_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 1.15.2 GPU training image from AWS Deep Learning Containers.
138 139 140 |
# File 'code_build/linux_gpu_build_image.rb', line 138 def self.DLC_TENSORFLOW_1_15_2_TRAINING() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_1_15_2_TRAINING") end |
.DLC_TENSORFLOW_2_0_0 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.0.0 GPU image from AWS Deep Learning Containers.
145 146 147 |
# File 'code_build/linux_gpu_build_image.rb', line 145 def self.DLC_TENSORFLOW_2_0_0() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_2_0_0") end |
.DLC_TENSORFLOW_2_0_1 ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.0.1 GPU image from AWS Deep Learning Containers.
152 153 154 |
# File 'code_build/linux_gpu_build_image.rb', line 152 def self.DLC_TENSORFLOW_2_0_1() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_2_0_1") end |
.DLC_TENSORFLOW_2_1_0_INFERENCE ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.1.0 GPU inference image from AWS Deep Learning Containers.
159 160 161 |
# File 'code_build/linux_gpu_build_image.rb', line 159 def self.DLC_TENSORFLOW_2_1_0_INFERENCE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_2_1_0_INFERENCE") end |
.DLC_TENSORFLOW_2_1_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.1.0 GPU training image from AWS Deep Learning Containers.
166 167 168 |
# File 'code_build/linux_gpu_build_image.rb', line 166 def self.DLC_TENSORFLOW_2_1_0_TRAINING() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_2_1_0_TRAINING") end |
.DLC_TENSORFLOW_2_2_0_TRAINING ⇒ AWSCDK::CodeBuild::IBuildImage
Tensorflow 2.2.0 GPU training image from AWS Deep Learning Containers.
173 174 175 |
# File 'code_build/linux_gpu_build_image.rb', line 173 def self.DLC_TENSORFLOW_2_2_0_TRAINING() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "DLC_TENSORFLOW_2_2_0_TRAINING") end |
.from_ecr_repository(repository, tag = nil) ⇒ AWSCDK::CodeBuild::IBuildImage
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.
52 53 54 55 56 |
# File 'code_build/linux_gpu_build_image.rb', line 52 def self.from_ecr_repository(repository, tag = nil) Jsii::Type.check_type(repository, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLklSZXBvc2l0b3J5In0=")), "repository") Jsii::Type.check_type(tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tag") unless tag.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.LinuxGpuBuildImage", "fromEcrRepository", [repository, tag]) end |
.jsii_overridable_methods ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'code_build/linux_gpu_build_image.rb', line 17 def self.jsii_overridable_methods { :default_compute_type => { kind: :property, name: "defaultComputeType", is_optional: false }, :image_id => { kind: :property, name: "imageId", is_optional: false }, :type => { kind: :property, name: "type", is_optional: false }, :image_pull_principal_type => { kind: :property, name: "imagePullPrincipalType", is_optional: true }, :bind => { kind: :method, name: "bind", is_optional: false }, :run_script_buildspec => { kind: :method, name: "runScriptBuildspec", is_optional: false }, :validate => { kind: :method, name: "validate", is_optional: false }, } end |
Instance Method Details
#bind(scope, project, _options) ⇒ AWSCDK::CodeBuild::BuildImageConfig
Function that allows the build image access to the construct tree.
211 212 213 214 215 216 217 |
# File 'code_build/linux_gpu_build_image.rb', line 211 def bind(scope, project, ) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(project, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLklQcm9qZWN0In0=")), "project") = .is_a?(Hash) ? ::AWSCDK::CodeBuild::BuildImageBindOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkJ1aWxkSW1hZ2VCaW5kT3B0aW9ucyJ9")), "_options") jsii_call_method("bind", [scope, project, ]) end |
#default_compute_type ⇒ AWSCDK::CodeBuild::ComputeType
The default ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.
180 181 182 |
# File 'code_build/linux_gpu_build_image.rb', line 180 def default_compute_type() jsii_get_property("defaultComputeType") end |
#image_id ⇒ String
The Docker image identifier that the build environment uses.
187 188 189 |
# File 'code_build/linux_gpu_build_image.rb', line 187 def image_id() jsii_get_property("imageId") end |
#image_pull_principal_type ⇒ AWSCDK::CodeBuild::ImagePullPrincipalType?
The type of principal that CodeBuild will use to pull this build Docker image.
201 202 203 |
# File 'code_build/linux_gpu_build_image.rb', line 201 def image_pull_principal_type() jsii_get_property("imagePullPrincipalType") end |
#run_script_buildspec(entrypoint) ⇒ AWSCDK::CodeBuild::BuildSpec
Make a buildspec to run the indicated script.
223 224 225 226 |
# File 'code_build/linux_gpu_build_image.rb', line 223 def run_script_buildspec(entrypoint) Jsii::Type.check_type(entrypoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "entrypoint") jsii_call_method("runScriptBuildspec", [entrypoint]) end |
#type ⇒ String
The type of build environment.
194 195 196 |
# File 'code_build/linux_gpu_build_image.rb', line 194 def type() jsii_get_property("type") end |
#validate(build_environment) ⇒ Array<String>
Allows the image a chance to validate whether the passed configuration is correct.
232 233 234 235 236 |
# File 'code_build/linux_gpu_build_image.rb', line 232 def validate(build_environment) build_environment = build_environment.is_a?(Hash) ? ::AWSCDK::CodeBuild::BuildEnvironment.new(**build_environment.transform_keys(&:to_sym)) : build_environment Jsii::Type.check_type(build_environment, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkJ1aWxkRW52aXJvbm1lbnQifQ==")), "buildEnvironment") jsii_call_method("validate", [build_environment]) end |