Generate a Docker container within the CI build #142
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #141
Changes:
Generate a Docker container within the CI build, tagged with a checksum of the
Dockerfile
andrequirements.txt
files so it can be reused across run. Store this Docker container in the AML ACR. Use this Docker container for running unit tests.Other jobs still use the mcr.microsoft.com/mlops/python:latest image as before. This allows derived projects to install "large" ML frameworks in the CI build, without making subsequent jobs needlessly slow to start.
Allow developers to lint & test locally in a single command: streamlined use of
flake8
andpytest
withintox
.Added code coverage report. Required adapted
pytest
commandline (now intox.ini
) and installing .NET Core as for security reasons, the AzDO PublishCodeCoverageResults does not publish user-generated HTML reports anymore.Linting fixes in some
.py
scripts to avoid CI build failing.Some simplifications in the build pipeline YAML.
Notes to MLOpsPython repo maintainers:
to
environment_setup/mlops-image`. The intention was to make it clear to users that there are two separate Docker images. The production AzDO pipeline that maintains the mcr.microsoft.com/mlops/python:latest image will have to be updated.