Azure / Azure/MachineLearningNotebooks
Unable to pull custom docker image in Compute Cluster from Azure private registry
- 主要語言
- Jupyter Notebook
- 星號
- 4.4k
- 分支
- 2.6k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Hi,
I have created a new machine learning environment with a connected ACR (without admin keys enabled).
We also have created a User assigned managed identity to enable managed identity authentication for the compute clusters. This identity has the ACRPull role assigned on the connected ACR.
However, when we try the following Python code as seen in the [documentation](https://docs.microsoft.com/en-us/azure/machine-learning/how-to-use-managed-identities?tabs=python#pull-docker-base-image-to-machine-learning-compute-cluster-for-training-as-is), it does not work:
```
env = Environment(name="private-acr")
env.docker.base_image = "as01weuacrom4vosf3mpux7.azurecr.io/custom:v1"
env.python.user_managed_dependencies = True
```
```
We get the following error message:
AzureMLCompute job failed.
FailedPullingImage: Unable to pull docker image
imageName: as01weuacrom4vosf3mpux7.azurecr.io/custom:v1
error: Run docker command to pull public image failed with error: Error response from daemon: Head "https://as01weuacrom4vosf3mpux7.azurecr.io/v2/custom/manifests/v1": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.
.
Reason: Error response from daemon: Head "https://as01weuacrom4vosf3mpux7.azurecr.io/v2/custom/manifests/v1": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.
Info: Failed to setup runtime for job execution: Job environment preparation failed on 10.235.22.6 with err exit status 1.
```
We also tried to build the image in ACR, but it also does not authenticate automatically.
The only way we can get this to work is when we enable ACR access keys, but this obviously is not a preferred solution.
Please not that all resources are behind a vnet, including the compute cluster which has public ip disabled.
Can you please advice what to do next, or what we can try?
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
先從連結的 managed-identities 文件和 issue 中顯示的 Environment 設定開始,接著檢查 AzureMLCompute 的映像拉取錯誤,以及所描述的 ACR 和 managed identity 設定。完成的標準是找出一個有文件說明的設定或修正方案,讓私有映像能在不啟用 ACR access keys 的情況下完成拉取,同時包括所述的 VNet 和 public-IP-disabled 限制。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- azure, docker, python
- 領域
- authentication, cloud, machine-learning
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100