ContainerDefinition
- class aws_cdk.aws_stepfunctions_tasks.ContainerDefinition(*, container_host_name=None, environment_variables=None, image=None, mode=None, model_package_name=None, model_s3_location=None)
Bases:
object
Describes the container, as part of model definition.
- See:
https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html
- ExampleMetadata:
infused
Example:
tasks.SageMakerCreateModel(self, "Sagemaker", model_name="MyModel", primary_container=tasks.ContainerDefinition( image=tasks.DockerImage.from_json_expression(sfn.JsonPath.string_at("$.Model.imageName")), mode=tasks.Mode.SINGLE_MODEL, model_s3_location=tasks.S3Location.from_json_expression("$.TrainingJob.ModelArtifacts.S3ModelArtifacts") ) )
- Parameters:
container_host_name (
Optional
[str
]) – This parameter is ignored for models that contain only a PrimaryContainer. When a ContainerDefinition is part of an inference pipeline, the value of the parameter uniquely identifies the container for the purposes of logging and metrics. Default: - Noneenvironment_variables (
Optional
[TaskInput
]) – The environment variables to set in the Docker container. Default: - No variablesimage (
Optional
[DockerImage
]) – The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored. Default: - Nonemode (
Optional
[Mode
]) – Defines how many models the container hosts. Default: - Mode.SINGLE_MODELmodel_package_name (
Optional
[str
]) – The name or Amazon Resource Name (ARN) of the model package to use to create the model. Default: - Nonemodel_s3_location (
Optional
[S3Location
]) – The S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). The S3 path is required for Amazon SageMaker built-in algorithms, but not if you use your own algorithms. Default: - None
Methods
- bind(task)
Called when the ContainerDefinition type configured on Sagemaker Task.
- Parameters:
task (
ISageMakerTask
) –- Return type: