Azure / Azure/azureml-examples

Creating an AzureML environment with a base image from a private repository and publishing to registry fails

Open
#3,420 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
2k
Forks
1.7k
Avg merge
18h 18m
Merged PRs (30d)
2

Description

### Operating System

Windows

### Version Information

azure-cli: 2.65.0
azure-cli-core: 2.65.0
azure-cli-telemetry: 1.1.0
extensions:
acrquery: 1.0.1
ml: 2.31.0

### Steps to reproduce

1. Generate a yaml environment definition:
$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json
name: uritomltable-environment
image: myacr.azurecr.io/azuremlbuild/myimage:1
description: Environment created from a Docker image
version: 1
2. Verify authentication to registry: User can do acr login and docker pull myacr.azurecr.io/azuremlbuild/myimage:1 (authentication works)
3. Create the environment on a registry running az ml environment create --file myenv.yml --registry-name MyRegistry

### Expected behavior

Environment is created and pushed to registry. Authentication should work if the user/service principal has rights to the acr and registries.
Extra taken steps:

### Actual behavior

Error is returned : Authentication failed for container registry myacr. Code: UserError

### Addition information

When trying to publish the environment to a workspace it works fine.
When trying to publish an environment to the registry with an image from an open registry (for example pytorch) it works fine.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with the provided myenv.yml, private ACR image, and az ml environment create command. Compare publishing to a workspace and publishing an environment using an open-registry image; done means the private image environment is created in the registry with valid ACR authentication.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, docker
Domain
authentication, cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.