ContainerImageConfig Class
Defines Image configuration settings specific to Container deployments - requires execution script and runtime.
In typical use cases, you will use the image_configuration
method of the
ContainerImage class to create a ContainerImageConfig object.
Initialize the config object.
- Inheritance
-
ContainerImageConfig
Constructor
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, cuda_version=None)
Parameters
- runtime
- str
The runtime to use for the image. Current supported runtimes are 'spark-py' and 'python'.
- conda_file
- str
The path to local file containing a conda environment definition to use for the image.
- docker_file
- str
The path to local file containing additional Docker steps to run when setting up the image.
- schema_file
- str
The path to local file containing a webservice schema to use when the image is deployed.
A list of paths to additional files/folders that the image needs to run.
- enable_gpu
- bool
Whether to enable GPU support in the image. The GPU image must be used on Microsoft Azure Services such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. Defaults to False.
A dictionary of key value properties to give this image. These properties cannot be changed after deployment, however new key value pairs can be added.
- base_image
- str
A custom image to be used as base image. If no base image is given then the base image will be used based off of given runtime parameter.
- base_image_registry
- ContainerRegistry
The image registry that contains the base image.
- cuda_version
- str
The version of CUDA to install for images that need GPU support. The GPU image must be used on Microsoft Azure Services such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. Supported versions are 9.0, 9.1, and 10.0. If 'enable_gpu' is set, this defaults to '9.1'.
- 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 such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. Defaults to false.
Dictionary of key value properties to give this image. These properties cannot be changed after deployment, however new key value pairs can be added
- base_image
- str
A custom image to be used as base image. If no base image is given then the base image will be used based off of given runtime parameter.
- cuda_version
- str
Version of CUDA to install for images that need GPU support. The GPU image must be used on Microsoft Azure Services such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. Supported versions are 9.0, 9.1, and 10.0. If 'enable_gpu' is set, this defaults to '9.1'.
Methods
build_create_payload |
Build the creation payload for the Container image. |
create_local_debug_payload |
Build the creation payload for the Container image. |
validate_configuration |
Check that the specified configuration values are valid. Raises a :class:azureml.exceptions.WebserviceException` if validation fails. |
build_create_payload
Build the creation payload for the Container image.
build_create_payload(workspace, name, model_ids)
Parameters
Returns
Container image creation payload.
Return type
Exceptions
create_local_debug_payload
Build the creation payload for the Container image.
create_local_debug_payload(workspace, model_ids)
Parameters
Returns
Container image creation payload.
Return type
Exceptions
validate_configuration
Check that the specified configuration values are valid.
Raises a :class:azureml.exceptions.WebserviceException` if validation fails.
validate_configuration()
Exceptions
Feedback
Submit and view feedback for