Azure / Azure/azure-cli-extensions

az ml environment create fails some file files present in the --build-context

Open
#5,560 5 comments 2 reactions 0 assignees View on GitHub
Auto-Assign customer-reported extension/ml Machine Learning question Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

## Describe the bug
My whole build context has 14MB (which is far less than declared limit of 300MB).
When I include 3 additional files (2x CSV + 1x XLSX) in the build context (which are not actually required by the Dockerfile at all!), the build fails. If those files are excluded - the build proceeds normally.

See the reproduction steps below.

**Command Name**
`az ml environment create`

`Extension Name: ml. Version: 2.11.0.`

**Errors:**
The command is successful, however the build fails immediately (with no build logs at all) in the Azure ML Studio.
```
Environment image build status
❌ Failed
```

## To Reproduce:
1. Clone https://github.com/marrrcin/azure-ml-environment-build-issue/tree/master
1. Run `az ml environment create --name {} -w {} -g {} --build-context . -d Dockerfile` in the root of the cloned repository

## Expected Behavior
Build succeeds.

## Environment Summary
```
macOS-12.5-x86_64-i386-64bit, Darwin 21.6.0
Python 3.10.8
Installer: HOMEBREW

azure-cli 2.42.0

Extensions:
storage-preview 0.8.3
ml 2.11.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1
```
## Additional Context
If I change the `.amlignore` to exclude the data folder:
```
!Dockerfile
data
```

then the build will proceed and finish successfully, which means that something in the data folder breaks the build context in the Azure ML Studio, but those are just plain CSV / XLSX files. I've tested the process and including ANY of them, break the platform with no logs.

I've also tested this by running the same from Linux, same result (failure).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.