environment Module

Contains functionality for creating and managing reproducible environments in Azure Machine Learning.

Environments provide a way to manage software dependency so that controlled environments are reproducible with minimal manual configuration as you move between local and distributed cloud development environments. An environment encapsulates Python packages, environment variables, software settings for training and scoring scripts, and run times on either Python, Spark, or Docker. For more information about using environments for training and deployment with Azure Machine Learning, see Create and manage reusable environments.



Defines a Docker build context.


DEPRECATED. Use the DockerConfiguration class.


AzureML docker image details class.


Defines a connection to an Azure Container Registry.


Defines settings to customize the Docker image built to the environment's specifications.

The DockerSection class is used in the Environment class to customize and control the final resulting Docker image that contains the specified environment.


Configures a reproducible Python environment for machine learning experiments.

An Environment defines Python packages, environment variables, and Docker settings that are used in machine learning experiments, including in data preparation, training, and deployment to a web service. An Environment is managed and versioned in an Azure Machine Learning Workspace. You can update an existing environment and retrieve a version to reuse. Environments are exclusive to the workspace they are created in and can't be used across different workspaces.

For more information about environments, see Create and manage reusable environments.


References an existing environment definition stored in the workspace.

An EnvironmentReference can be used in place of an Environment object.


Environment image build class.

ImageBuildDetails class provides details about environment image build status.


DEPRECATED. Use the PythonSection class.


Defines the Python environment and interpreter to use on a target compute for a run.

This class is used in the Environment class.


Defines the CRAN packages to be installed.


Defines the Github packages to be installed.


Defines the R environment to use on a target compute for a run.

This class is used in the :class :azureml.core.Environment class .


DEPRECATED. Use the SparkSection class.


Defines a Spark dependency (package).


Defines Spark settings to use for the PySpark framework in the environment.

This SparkSection class is used in the Environment class.