I've trained a model and deployed it to ACI using Azure ML studio. It works as expected. Now I want to download the docker image and use it in my local environment. Is it possible to download the image using CLI?
-
Any updates on this question? Does it solve your problem? If it works for you please accept it. – Charles Xu Jan 13 '21 at 08:02
-
Nope. ACR is empty, I see the container in ACI only. And it's impossible to download it. – Artem Jan 17 '21 at 14:17
-
Can you share the screenshot of the ACI image message? – Charles Xu Jan 18 '21 at 01:40
2 Answers
Azure ML Studio must have pushed a container image somewhere before spinning up a container instance on ACI. You might be able to find out the image name by using Docker's ACI integration. For instance, you could run...
$ docker login azure
$ docker context create aci myacicontext
$ docker ps
... and check the IMAGE
value of your running container, and see if you can pull that image to your local machine. If not, you might be able to create a new one using docker commit.

- 9,220
- 10
- 51
- 83
-
1Unfortunately, it doesn't work. Export, copy and commit commands are not available in the ACI context – Artem Jan 03 '21 at 19:45
-
-
I pushed the image to ACI using AML studio deploy button. The image name is autogenerated – Artem Jan 03 '21 at 20:53
-
I don't believe it's possible to push an image directly to ACI. It would first get pushed to a registry such as Docker Hub or ACR, and then ACI would pull it from there. So the question is, can you pull the image from that same registry from your local machine. I'm not familiar with Azure ML Studio, but would suggest researching more in this direction. – Max Jan 03 '21 at 22:14
-
Yes, I'm available to download from Azure Container registry but there is no image with the model. I can see only in aci context https://imgur.com/t4au3gv – Artem Jan 05 '21 at 07:03
Now I want to download the docker image and use it in my local environment. Is it possible to download the image using CLI?
It's possible to download the Docker image via CLI. When you trained a model and deployed it to ACI using Azure ML studio, there must be a place to store the images. Private registry or the public registry. You can see the tutorial, you can use a private registry such as the ACR, or other private registries. You can also use the Azure Machine Learning base images stored in the Microsoft registry, it's similar to the Docker hub.
If you have known where is the docker images stored, then you can download the docker images to your local environment.
From the public registry such as the Docker hub, you can pull the images directly:
docker pull image:tag
If it's a private registry, you need to log in with the credential first, for example, you use the Azure Container Registry:
docker login myacr.azurecr.io -u username -p password
docker pull myacr.azurecr.io/image:tag
Of course, you need to install the Docker server in your local environment first.

- 29,862
- 2
- 22
- 39
-
That is the point. I have no idea there is the image stored. I can't select the registry to store the image https://imgur.com/a/armKqEH and all my registries are empty. Also, I can't do anything with the ACI images https://imgur.com/a/upo5nVn – Artem Jan 05 '21 at 07:11
-
@Artem When you integrate ACI with the docker compose, then you cannot change the image locally. And as the second screenshot shows, the first image is stored in the ACR and the second image is a public image stored in the Microsoft registry. If you want to make changes to the images, you need to download them to local and do the changes. So I don't know why you cannot know where are the images stored. – Charles Xu Jan 05 '21 at 08:07
-
I don't use docker compose. I just deploy the model from ML Studio. I don't want to change the images, I want to download them and use locally. And I said previously, my registry on Azure portal is empty. – Artem Jan 05 '21 at 19:57
-
@Artem When you deploy the images to the ACI, you can get the image information from the ACI, then you can download the images. So I don't know why you cannot find where do the images store. – Charles Xu Jan 06 '21 at 07:47