ContainerImageConfig class

Definition

Image config specific to Container deployments - requires execution script and runtime.

ContainerImageConfig(execution_script, runtime, conda_file=None, docker_file=None, schema_file=None, dependencies=None, enable_gpu=None, tags=None, properties=None, description=None, base_image=None, base_image_registry=None, allow_absolute_path=False)
Inheritance
ContainerImageConfig

Parameters

execution_script
str

Path to local file that contains the code to run for the image

runtime
str

Which runtime to use for the image. Current supported runtimes are 'spark-py' and 'python'

conda_file
str

Path to local file containing a conda environment definition to use for the image

docker_file
str

Path to local file containing additional Docker steps to run when setting up the image

schema_file
str

Path to local file containing a webservice schema to use when the image is deployed

dependencies
<xref:azureml.core.image.container.list[str]>

List of paths to additional files/folders that the image needs to run

enable_gpu
bool

Whether or not to enable GPU support in the image. The GPU image must be used on Microsoft Azure Services only such as ACI, AML Compute, Azure VMs, and AKS.

tags
dict[str or str]

Dictionary of key value tags to give this image

properties
dict[str or str]

Dictionary of key value properties to give this image. These properties cannot be changed after deployment, however new key value pairs can be added

description
str

A description to give this image

base_image
str

A custom image to be used as base image.

base_image_registry
ContainerRegistry

Image registry that contains the base image.

Methods

build_create_payload(workspace, name, model_ids)

Build the creation payload for the Container image.

create_local_debug_payload(workspace, model_ids)

Build the creation payload for the Container image.

validate_configuration()

Check that the specified configuration values are valid.

Will raise a WebserviceException if validation fails.

build_create_payload(workspace, name, model_ids)

Build the creation payload for the Container image.

build_create_payload(workspace, name, model_ids)

Parameters

workspace
Workspace

The workspace object to create the image in

name
str

The name of the image

model_ids
<xref:azureml.core.image.container.list[str]>

A list of model IDs to package into the image

Returns

Container image creation payload

Return type

create_local_debug_payload(workspace, model_ids)

Build the creation payload for the Container image.

create_local_debug_payload(workspace, model_ids)

Parameters

workspace
Workspace

The workspace object to create the image in

model_ids
<xref:azureml.core.image.container.list[str]>

A list of model IDs to package into the image

Returns

Container image creation payload

Return type

validate_configuration()

Check that the specified configuration values are valid.

Will raise a WebserviceException if validation fails.

validate_configuration()