MicrosoftDocs / pipelines-azureml

Example Azure Pipeline to train and deploy a machine learning model using the Azure Machine Learning service
Creative Commons Attribution 4.0 International
114 stars 513 forks source link

Running h2o.ai in Azure ML (Installing Java is a must) #12

Closed mkrdip closed 4 years ago

mkrdip commented 4 years ago

mcr.microsoft.com/azureml/base:0.2.4 is pretty flat, so tried a few steps to install Java.

1) Adding a custom base dockerfile

script: train.py
arguments: []
framework: Python
environment:
  python:
    userManagedDependencies: false
    interpreterPath: python
    condaDependenciesFile: train-env.yml
  docker:
    enabled: true
    baseDockerfile: Dockerfile

Returns error:

Output from dependency scanning: fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

2) Add an argument to the docker. According to this documentation and this one as well, I can add an argument to the docker command. So, tried the following.

script: train.py
arguments: []
framework: Python
environment:
  python:
    userManagedDependencies: false
    interpreterPath: python
    condaDependenciesFile: config/train-conda.yml
  docker:
    enabled: true
    baseImage: mcr.microsoft.com/azureml/base:0.2.4
    arguments: ["--run","apt-get install default-jdk"] 

also arguments: "apt-get install default-jdk" like this.

As there is no documentation about it, having issues installing Java on the environment. Looking for your help.

mkrdip commented 4 years ago

Got this working by creating a Custom Docker Image and putting it to the ACR tied to Azure ML workspace. If the docker image is in any other ACR then it needs to be specified like following, get the admin based (basic or standard ACR) or token-based (Premium ACR) username/password.

docker:
    baseImage: youracrname.azurecr.io/imagename:v1
    baseImageRegistry: {
            "address": "youracrname.azurecr.io",
            "username": "username",
            "password": "password"
          }

Closing this as my issue is resolved. I suggest updating the documentation on docker specification for .runconfig files.