diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 787fa327..b1ae0a5d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,9 @@ pool: vmImage: 'Ubuntu 16.04' -container: dtzar/conda3mlops:latest +container: + image: mlopscr.azurecr.io/public/mlops/mlopspython:latest + endpoint: acrconnection variables: - group: AzureKeyVaultSecrets diff --git a/environment_setup/Dockerfile b/environment_setup/Dockerfile index d199b243..b6b3be6a 100644 --- a/environment_setup/Dockerfile +++ b/environment_setup/Dockerfile @@ -1,7 +1,13 @@ FROM conda/miniconda3 -COPY . /setup +LABEL org.label-schema.vendor = "Microsoft" \ + org.label-schema.url = "https://hub.docker.com/r/microsoft/mlopspython" \ + org.label-schema.vcs-url = "https://github.com/microsoft/MLOpsPython" -RUN ["apt", "update"] -RUN apt install gcc -y && pip install -r /setup/requirements.txt -RUN pip install azure-cli==2.0.65 && pip install --upgrade azureml-sdk[cli] \ No newline at end of file + + +COPY environment_setup/requirements.txt /setup/ + +RUN apt-get update && apt-get install gcc -y && pip install --upgrade -r /setup/requirements.txt + +CMD ["python"] \ No newline at end of file diff --git a/environment_setup/docker-image-pipeline.yml b/environment_setup/docker-image-pipeline.yml index 2ee943f1..c88884d8 100644 --- a/environment_setup/docker-image-pipeline.yml +++ b/environment_setup/docker-image-pipeline.yml @@ -13,20 +13,17 @@ trigger: include: - environment_setup/* -steps: - -- task: Docker@2 - displayName: Login to Docker Hub - inputs: - command: login - containerRegistry: msftDockerHub +variables: + containerRegistry: $[coalesce(variables['acrServiceConnection'], 'acrconnection')] + imageName: $[coalesce(variables['agentImageName'], 'public/mlops/mlopspython')] -- task: Docker@2 - displayName: 'Build and push an image' - inputs: - command: buildAndPush - repository: dtzar/conda3mlops - buildContext: '$(Build.SourcesDirectory)/environment_setup' - tags: | - $(Build.BuildNumber) - latest \ No newline at end of file +steps: + - task: Docker@2 + displayName: Build and Push + inputs: + command: buildAndPush + containerRegistry: '$(containerRegistry)' + repository: '$(imageName)' + tags: 'latest' + buildContext: '$(Build.SourcesDirectory)' + dockerFile: '$(Build.SourcesDirectory)/environment_setup/Dockerfile' diff --git a/environment_setup/requirements.txt b/environment_setup/requirements.txt index b3c2a14c..bbd03023 100644 --- a/environment_setup/requirements.txt +++ b/environment_setup/requirements.txt @@ -1,5 +1,7 @@ -scipy==1.0.0 -scikit-learn==0.19.1 -numpy==1.14.5 -pandas==0.23.1 -pytest==4.3.0 \ No newline at end of file +pytest==4.3.0 +requests>=2.22 +azureml>=0.2 +azureml-core>=1.0 +azureml-pipeline>=1.0 +azure-cli==2.0.46 +azureml-sdk[cli]