class ContainerImage
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Sagemaker.Alpha.ContainerImage |
Go | github.com/aws/aws-cdk-go/awscdksagemakeralpha/v2#ContainerImage |
Java | software.amazon.awscdk.services.sagemaker.alpha.ContainerImage |
Python | aws_cdk.aws_sagemaker_alpha.ContainerImage |
TypeScript (source) | @aws-cdk/aws-sagemaker-alpha ยป ContainerImage |
Constructs for types of container images.
Example
import * as sagemaker from '@aws-cdk/aws-sagemaker-alpha';
declare const image: sagemaker.ContainerImage;
declare const modelData: sagemaker.ModelData;
const model = new sagemaker.Model(this, 'ContainerModel', {
containers: [
{
image,
modelData,
}
],
networkIsolation: true,
});
Initializer
new ContainerImage()
Methods
| Name | Description |
|---|---|
| bind(scope, model) | Called when the image is used by a Model. |
| static from | Reference an image that's constructed directly from sources on disk. |
| static from | Reference an AWS Deep Learning Container image. |
| static from | Reference an image in an ECR repository. |
bind(scope, model)
public bind(scope: Construct, model: Model): ContainerImageConfig
Parameters
Returns
Called when the image is used by a Model.
static fromAsset(directory, options?)
public static fromAsset(directory: string, options?: DockerImageAssetOptions): ContainerImage
Parameters
- directory
stringโ The directory where the Dockerfile is stored. - options
Dockerโ The options to further configure the selected image.Image Asset Options
Returns
Reference an image that's constructed directly from sources on disk.
static fromDlc(repositoryName, tag, accountId?)
public static fromDlc(repositoryName: string, tag: string, accountId?: string): ContainerImage
Parameters
- repositoryName
string - tag
string - accountId
string
Returns
Reference an AWS Deep Learning Container image.
static fromEcrRepository(repository, tag?)
public static fromEcrRepository(repository: IRepository, tag?: string): ContainerImage
Parameters
- repository
IRepository - tag
string
Returns
Reference an image in an ECR repository.

.NET
Go
Java
Python
TypeScript (