diff --git a/docs/custom_container.md b/docs/custom_container.md index 94851d84..8c031d15 100644 --- a/docs/custom_container.md +++ b/docs/custom_container.md @@ -7,12 +7,21 @@ to run test and deployment code. `mcr.microsoft.com/mlops/python:latest` is built with this [Dockerfile](../environment_setup/Dockerfile). +Additionally mcr.microsoft.com/mlops/python image is also tagged with below tags. + +| Image Tags | Description | +| ----------------------------------------------- | :---------------------------------------------------------------------------------------- | +| mcr.microsoft.com/mlops/python:latest | latest image | +| mcr.microsoft.com/mlops/python:build-[id] | where [id] is Azure Devops build id e.g. mcr.microsoft.com/mlops/python:build-20200325.1 | +| mcr.microsoft.com/mlops/python:amlsdk-[version] | where [version] is aml sdk version e.g. mcr.microsoft.com/mlops/python:amlsdk-1.1.5.1 | +| mcr.microsoft.com/mlops/python:release-[id] | where [id] is github release id e.g. mcr.microsoft.com/mlops/python:release-3.0.0 | | + In your project you will want to build your own Docker image that only contains the dependencies and tools required for your use case. This image will be more likely smaller and therefore faster, and it -will be totally maintained by your team. +will be totally maintained by your team. -## Provision an Azure Container Registry +## Provision an Azure Container Registry An Azure Container Registry is deployed along your Azure ML Workspace to manage models. You can use that registry instance to store your MLOps container image as well, or @@ -21,6 +30,7 @@ provision a separate instance. ## Create a Registry Service Connection [Create a service connection](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#sep-docreg) to your Azure Container Registry: + - As *Connection type*, select *Docker Registry* - As *Registry type*, select *Azure Container Registry* - As *Azure container registry*, select your Container registry instance @@ -83,7 +93,7 @@ Run the pipeline and ensure your container has been used. Especially when working in a team, it's possible for environment changes across branches to interfere with one another. For example, if the master branch is using scikit-learn and you create a branch to use Tensorflow instead, and you -decide to remove scikit-learn from the +decide to remove scikit-learn from the [ci_dependencies.yml](../diabetes_regression/ci_dependencies.yml) Conda environment definition and run the [docker-image-pipeline.yml](../environment_setup/docker-image-pipeline.yml) Docker image, then the master branch will stop building. diff --git a/environment_setup/docker-image-pipeline.yml b/environment_setup/docker-image-pipeline.yml index f15ff290..29587533 100644 --- a/environment_setup/docker-image-pipeline.yml +++ b/environment_setup/docker-image-pipeline.yml @@ -16,8 +16,8 @@ trigger: variables: containerRegistry: $[coalesce(variables['acrServiceConnection'], 'acrconnection')] - imageName: $[coalesce(variables['agentImageName'], 'public/mlops/python')] - + imageName: $[coalesce(variables['agentImageName'], 'public/mlops/python')] + steps: - task: Docker@2 displayName: Build and Push @@ -26,7 +26,9 @@ steps: containerRegistry: '$(containerRegistry)' repository: '$(imageName)' tags: | - $(Build.BuildNumber) + ${{format('build-{0}', '$(Build.BuildNumber)')}} + ${{format('amlsdk-{0}', '$(amlsdkversion)')}} + ${{format('release-{0}', '$(githubrelease)')}} latest buildContext: '$(Build.SourcesDirectory)' dockerFile: '$(Build.SourcesDirectory)/environment_setup/Dockerfile'