Skip to content

Commit e22f243

Browse files
authored
Merge pull request #38 from microsoft/eedorenko/mlops-docker-image
Add MLOps Docker Image
2 parents ce8b8d7 + 791e1b5 commit e22f243

File tree

4 files changed

+33
-26
lines changed

4 files changed

+33
-26
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
pool:
22
vmImage: 'Ubuntu 16.04'
33

4-
container: dtzar/conda3mlops:latest
4+
container:
5+
image: mlopscr.azurecr.io/public/mlops/mlopspython:latest
6+
endpoint: acrconnection
57

68
variables:
79
- group: AzureKeyVaultSecrets

environment_setup/Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
FROM conda/miniconda3
22

3-
COPY . /setup
3+
LABEL org.label-schema.vendor = "Microsoft" \
4+
org.label-schema.url = "https://hub.docker.com/r/microsoft/mlopspython" \
5+
org.label-schema.vcs-url = "https://github.com/microsoft/MLOpsPython"
46

5-
RUN ["apt", "update"]
6-
RUN apt install gcc -y && pip install -r /setup/requirements.txt
7-
RUN pip install azure-cli==2.0.65 && pip install --upgrade azureml-sdk[cli]
7+
8+
9+
COPY environment_setup/requirements.txt /setup/
10+
11+
RUN apt-get update && apt-get install gcc -y && pip install --upgrade -r /setup/requirements.txt
12+
13+
CMD ["python"]

environment_setup/docker-image-pipeline.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,17 @@ trigger:
1313
include:
1414
- environment_setup/*
1515

16-
steps:
17-
18-
- task: Docker@2
19-
displayName: Login to Docker Hub
20-
inputs:
21-
command: login
22-
containerRegistry: msftDockerHub
16+
variables:
17+
containerRegistry: $[coalesce(variables['acrServiceConnection'], 'acrconnection')]
18+
imageName: $[coalesce(variables['agentImageName'], 'public/mlops/mlopspython')]
2319

24-
- task: Docker@2
25-
displayName: 'Build and push an image'
26-
inputs:
27-
command: buildAndPush
28-
repository: dtzar/conda3mlops
29-
buildContext: '$(Build.SourcesDirectory)/environment_setup'
30-
tags: |
31-
$(Build.BuildNumber)
32-
latest
20+
steps:
21+
- task: Docker@2
22+
displayName: Build and Push
23+
inputs:
24+
command: buildAndPush
25+
containerRegistry: '$(containerRegistry)'
26+
repository: '$(imageName)'
27+
tags: 'latest'
28+
buildContext: '$(Build.SourcesDirectory)'
29+
dockerFile: '$(Build.SourcesDirectory)/environment_setup/Dockerfile'

environment_setup/requirements.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
scipy==1.0.0
2-
scikit-learn==0.19.1
3-
numpy==1.14.5
4-
pandas==0.23.1
5-
pytest==4.3.0
1+
pytest==4.3.0
2+
requests>=2.22
3+
azureml>=0.2
4+
azureml-core>=1.0
5+
azureml-pipeline>=1.0
6+
azure-cli==2.0.46
7+
azureml-sdk[cli]

0 commit comments

Comments
 (0)