-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
145 additions
and
1 deletion.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
configuration/environments/environment_inference_dockerfile/BaseDockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
FROM mcr.microsoft.com/azureml/openmpi3.1.2-ubuntu18.04 | ||
RUN apt-get update | ||
RUN apt-get install ffmpeg libsm6 libxext6 -y | ||
RUN apt-get update && apt-get install -y python3-opencv | ||
RUN pip install opencv-python |
44 changes: 44 additions & 0 deletions
44
configuration/environments/environment_inference_dockerfile/azureml_environment.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "environment_inference_dockerfile", | ||
"version": "oct21", | ||
"environmentVariables": { | ||
"EXAMPLE_ENV_VAR": "EXAMPLE_VALUE" | ||
}, | ||
"python": { | ||
"userManagedDependencies": false, | ||
"interpreterPath": "python", | ||
"condaDependenciesFile": null, | ||
"baseCondaEnvironment": null | ||
}, | ||
"docker": { | ||
"enabled": false, | ||
"baseImage": null, | ||
"sharedVolumes": true, | ||
"shmSize": null, | ||
"arguments": [], | ||
"baseImageRegistry": { | ||
"address": null, | ||
"username": null, | ||
"password": null, | ||
"registryIdentity": null | ||
}, | ||
"platform": { | ||
"os": "Linux", | ||
"architecture": "amd64" | ||
} | ||
}, | ||
"spark": { | ||
"repositories": [], | ||
"packages": [], | ||
"precachePackages": true | ||
}, | ||
"databricks": { | ||
"mavenLibraries": [], | ||
"pypiLibraries": [], | ||
"rcranLibraries": [], | ||
"jarLibraries": [], | ||
"eggLibraries": [] | ||
}, | ||
"r": null, | ||
"inferencingStackVersion": null | ||
} |
11 changes: 11 additions & 0 deletions
11
configuration/environments/environment_inference_dockerfile/conda_dependencies.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.8 | ||
- pip: | ||
- azureml-core==1.35.0 | ||
- azureml-defaults==1.35.0 | ||
- pandas | ||
- joblib | ||
|
||
name: basic_env |
6 changes: 6 additions & 0 deletions
6
configuration/environments/environment_training_dockerfile/BaseDockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
FROM mcr.microsoft.com/azureml/openmpi3.1.2-ubuntu18.04 | ||
RUN apt-get update | ||
RUN apt-get install ffmpeg libsm6 libxext6 -y | ||
RUN apt-get update && apt-get install -y python3-opencv | ||
RUN pip install opencv-python |
44 changes: 44 additions & 0 deletions
44
configuration/environments/environment_training_dockerfile/azureml_environment.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "environment_training_dockerfile", | ||
"version": "oct21", | ||
"environmentVariables": { | ||
"EXAMPLE_ENV_VAR": "EXAMPLE_VALUE" | ||
}, | ||
"python": { | ||
"userManagedDependencies": false, | ||
"interpreterPath": "python", | ||
"condaDependenciesFile": null, | ||
"baseCondaEnvironment": null | ||
}, | ||
"docker": { | ||
"enabled": false, | ||
"baseImage": null, | ||
"sharedVolumes": true, | ||
"shmSize": null, | ||
"arguments": [], | ||
"baseImageRegistry": { | ||
"address": null, | ||
"username": null, | ||
"password": null, | ||
"registryIdentity": null | ||
}, | ||
"platform": { | ||
"os": "Linux", | ||
"architecture": "amd64" | ||
} | ||
}, | ||
"spark": { | ||
"repositories": [], | ||
"packages": [], | ||
"precachePackages": true | ||
}, | ||
"databricks": { | ||
"mavenLibraries": [], | ||
"pypiLibraries": [], | ||
"rcranLibraries": [], | ||
"jarLibraries": [], | ||
"eggLibraries": [] | ||
}, | ||
"r": null, | ||
"inferencingStackVersion": null | ||
} |
11 changes: 11 additions & 0 deletions
11
configuration/environments/environment_training_dockerfile/conda_dependencies.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.8 | ||
- pip: | ||
- azureml-core==1.35.0 | ||
- azureml-defaults==1.35.0 | ||
- pandas | ||
- joblib | ||
|
||
name: basic_env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Customizing the base docker image (mcr.microsoft.com/azureml/openmpi3.1.2-ubuntu18.04:20210922.v1) | ||
You have the option to specify your custom docker images for training and inference separately. | ||
|
||
## First Step: Define your dockerfile | ||
In case you need to upgrade/change packages in Linux (using for example apt-get install / apt-get update) or define additional commands you have the option to configure the Dockerfile on your own. | ||
|
||
**[Environments](../../configuration/environments/)** contains two docker-related folders "environment_inference_dockerfile" and "environment_training_dockerfile" with the corresponding Dockerfile (BaseDockerfile). | ||
|
||
## Second Step: Change the environment path | ||
After having set up your Dockerfile, you need to change the paths here: **[Configurations](../../configuration/configuration-aml.variables.yml)** | ||
|
||
Replace "AML_TRAINING_ENV_PATH" with "configuration/environments/environment_training_dockerfile" if you need the adjusted dockerfile for training. | ||
Replace "AML_BATCHINFERENCE_ENV_PATH" with "configuration/environments/environment_inference_dockerfile" if you need the adjusted dockerfile for training. | ||
|
||
In case you want to deploy your own webservice, you can customize your docker images differently. Issue [#29](https://github.com/microsoft/dstoolkit-mlops-base/issues/29) describes this enhancement. | ||
|
||
For more detail, please refer to *[GettingStarted](GettingStarted.md)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters