Create custom curated Azure Container for PyTorch (ACPT) environments in Azure Machine Learning studio

In this article you'll learn to create a custom environment in Azure Machine learning. Custom Environments allow you to extend curated environments and add Hugging Face (HF) transformers, datasets or install any other external packages with Azure Machine Learning. Azure machine Learning offers to create a new environment with docker context containing ACPT curated environment as a base image and additional packages on top of it.


Before following the steps in this article, make sure you have the following prerequisites:

In the Azure Machine Learning studio, navigate to the "Environments" section by selecting the "Environments" option.

Screenshot of navigating to environments from Azure Machine Learning studio.

Navigate to curated environments and search "acpt" to list all the available ACPT curated environments. Selecting the environment shows details of the environment.

Screenshot of navigating to curated environments.

Get details of the curated environments

To create a custom environment, you need the base docker image repository, which can be found in the Description section as Azure Container Registry. Copy the Azure Container Registry name, which is used later when you create a new custom environment.

Screenshot of getting container registry name.

Go back and select the Custom Environments tab.

Screenshot of navigating to custom environments.

Create custom environments

Select + Create. In the "Create Environment" window, name the environment, description, and select Create a new docker context in the Select environments type section.

Screenshot of creating custom environment.

Paste the docker image name that you copied in previously. Configure your environment by declaring the base image and add any env variables you want to use and the packages that you want to include.

Screenshot of configuring the environment with name, packages with docker context.

Review your environment settings, add any tags if needed and select on the Create button to create your custom environment.

That's it! You've now created a custom environment in Azure Machine Learning studio and can use it to run your machine learning models.

Next steps