Skip to content

Commit

Permalink
Sudivate dockertag (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudivate authored Mar 26, 2020
1 parent f2dc7d7 commit a562b59
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
16 changes: 13 additions & 3 deletions docs/custom_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions environment_setup/docker-image-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +26,9 @@ steps:
containerRegistry: '$(containerRegistry)'
repository: '$(imageName)'
tags: |
$(Build.BuildNumber)
${{format('build-{0}', '$(Build.BuildNumber)')}}
${{format('amlsdk-{0}', '$(amlsdkversion)')}}

This comment has been minimized.

Copy link
@saroup

saroup Apr 13, 2020

where are amlsdkversion and githubrelease defined? @sudivate

This comment has been minimized.

Copy link
@sudivate

sudivate Apr 13, 2020

Author Contributor

These variables are defined by AzDo pipeline variables through the portal and values are set at the time of executing pipelines.

${{format('release-{0}', '$(githubrelease)')}}
latest
buildContext: '$(Build.SourcesDirectory)'
dockerFile: '$(Build.SourcesDirectory)/environment_setup/Dockerfile'

0 comments on commit a562b59

Please sign in to comment.