Skip to content

Commit a562b59

Browse files
authored
Sudivate dockertag (#240)
1 parent f2dc7d7 commit a562b59

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

docs/custom_container.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,21 @@ to run test and deployment code.
77
`mcr.microsoft.com/mlops/python:latest` is built with this
88
[Dockerfile](../environment_setup/Dockerfile).
99

10+
Additionally mcr.microsoft.com/mlops/python image is also tagged with below tags.
11+
12+
| Image Tags | Description |
13+
| ----------------------------------------------- | :---------------------------------------------------------------------------------------- |
14+
| mcr.microsoft.com/mlops/python:latest | latest image |
15+
| mcr.microsoft.com/mlops/python:build-[id] | where [id] is Azure Devops build id e.g. mcr.microsoft.com/mlops/python:build-20200325.1 |
16+
| 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 |
17+
| mcr.microsoft.com/mlops/python:release-[id] | where [id] is github release id e.g. mcr.microsoft.com/mlops/python:release-3.0.0 | |
18+
1019
In your project you will want to build your own
1120
Docker image that only contains the dependencies and tools required for your
1221
use case. This image will be more likely smaller and therefore faster, and it
13-
will be totally maintained by your team.
22+
will be totally maintained by your team.
1423

15-
## Provision an Azure Container Registry
24+
## Provision an Azure Container Registry
1625

1726
An Azure Container Registry is deployed along your Azure ML Workspace to manage models.
1827
You can use that registry instance to store your MLOps container image as well, or
@@ -21,6 +30,7 @@ provision a separate instance.
2130
## Create a Registry Service Connection
2231

2332
[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:
33+
2434
- As *Connection type*, select *Docker Registry*
2535
- As *Registry type*, select *Azure Container Registry*
2636
- As *Azure container registry*, select your Container registry instance
@@ -83,7 +93,7 @@ Run the pipeline and ensure your container has been used.
8393
Especially when working in a team, it's possible for environment changes across branches to interfere with one another.
8494

8595
For example, if the master branch is using scikit-learn and you create a branch to use Tensorflow instead, and you
86-
decide to remove scikit-learn from the
96+
decide to remove scikit-learn from the
8797
[ci_dependencies.yml](../diabetes_regression/ci_dependencies.yml) Conda environment definition
8898
and run the [docker-image-pipeline.yml](../environment_setup/docker-image-pipeline.yml) Docker image,
8999
then the master branch will stop building.

environment_setup/docker-image-pipeline.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ trigger:
1616

1717
variables:
1818
containerRegistry: $[coalesce(variables['acrServiceConnection'], 'acrconnection')]
19-
imageName: $[coalesce(variables['agentImageName'], 'public/mlops/python')]
20-
19+
imageName: $[coalesce(variables['agentImageName'], 'public/mlops/python')]
20+
2121
steps:
2222
- task: Docker@2
2323
displayName: Build and Push
@@ -26,7 +26,9 @@ steps:
2626
containerRegistry: '$(containerRegistry)'
2727
repository: '$(imageName)'
2828
tags: |
29-
$(Build.BuildNumber)
29+
${{format('build-{0}', '$(Build.BuildNumber)')}}
30+
${{format('amlsdk-{0}', '$(amlsdkversion)')}}
31+
${{format('release-{0}', '$(githubrelease)')}}
3032
latest
3133
buildContext: '$(Build.SourcesDirectory)'
3234
dockerFile: '$(Build.SourcesDirectory)/environment_setup/Dockerfile'

0 commit comments

Comments
 (0)