@aws-cdk_aws-sagemaker-alpha.ContainerImage
static from
static from
static from
class ContainerImage
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Sagemaker.Alpha.ContainerImage |
![]() | github.com/aws/aws-cdk-go/awscdksagemakeralpha/v2#ContainerImage |
![]() | software.amazon.awscdk.services.sagemaker.alpha.ContainerImage |
![]() | aws_cdk.aws_sagemaker_alpha.ContainerImage |
![]() | @aws-cdk/aws-sagemaker-alpha ยป ContainerImage |
Constructs for types of container images.
Example
import * as ecr from 'aws-cdk-lib/aws-ecr';
import * as sagemaker from '@aws-cdk/aws-sagemaker-alpha';
const repository = ecr.Repository.fromRepositoryName(this, 'Repository', 'repo');
const image = sagemaker.ContainerImage.fromEcrRepository(repository, 'tag');
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.
Asset(directory, options?)
static frompublic 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.
Dlc(repositoryName, tag, accountId?)
static frompublic static fromDlc(repositoryName: string, tag: string, accountId?: string): ContainerImage
Parameters
- repositoryName
string
- tag
string
- accountId
string
Returns
Reference an AWS Deep Learning Container image.
EcrRepository(repository, tag?)
static frompublic static fromEcrRepository(repository: IRepository, tag?: string): ContainerImage
Parameters
- repository
IRepository
- tag
string
Returns
Reference an image in an ECR repository.