Skip to content

Commit

Permalink
update images to ubuntu 22.04 & fix integ test (#1532)
Browse files Browse the repository at this point in the history
## Describe your changes

- Update images to ubuntu 22.04. 
  - GPU image may nee to be updated to cuda 12.x. 
- Fix integ test to unblock pipeline.

## Checklist before requesting a review
- [ ] Add unit tests for this change.
- [ ] Make sure all tests can pass.
- [ ] Update documents if necessary.
- [ ] Lint and apply fixes to your code by running `lintrunner -a`
- [ ] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.
- [ ] Is this PR including examples changes? If yes, please remember to
update [example
documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md)
in a follow-up PR.

## (Optional) Issue link
  • Loading branch information
xiaoyu-work authored Dec 20, 2024
1 parent f372b89 commit 0e328a5
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ You can specify your Azure ML Compute as an Olive System and use it as a host to
"type": "AzureML",
"aml_compute": "cpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
"conda_file_path": "conda.yaml"
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/source/how-to/configure-workflows/systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ There are some readymade systems available for AzureML. These systems are pre-co
],
"aml_compute": "gpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
"conda_file_path": "conda.yaml"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/bert/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# mcr image https://github.com/microsoft/mcr
# tag list https://mcr.microsoft.com/v2/azureml/openmpi4.1.0-ubuntu20.04/tags/list
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04

ARG OPENVINO_VERSION=2023.3.0

Expand Down
4 changes: 2 additions & 2 deletions examples/llama2/notebook/llama2/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"hf_token": true,
"aml_compute": "<my_aml_compute>",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.6-cudnn8-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04",
"conda_file_path": "conda.yaml"
}
},
Expand All @@ -30,7 +30,7 @@
"accelerators": [ { "device": "gpu", "execution_providers": [ "CUDAExecutionProvider" ] } ],
"aml_compute": "<my_arc_compute>",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.6-cudnn8-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04",
"conda_file_path": "conda.yaml"
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/llama2/notebook/llama2/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
" \"hf_token\": true,\n",
" \"aml_compute\": \"<my_aml_compute>\",\n",
" \"aml_docker_config\": {\n",
" \"base_image\": \"mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.6-cudnn8-ubuntu20.04\",\n",
" \"base_image\": \"mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04\",\n",
" \"conda_file_path\": \"conda.yaml\"\n",
" }\n",
" },\n",
Expand All @@ -82,7 +82,7 @@
" \"hf_token\": true,\n",
" \"aml_compute\": \"<my_arc_compute>\",\n",
" \"aml_docker_config\": {\n",
" \"base_image\": \"mcr.microsoft.com/azureml/openmpi4.0-cuda11.6-cudnn8-ubuntu20.04\",\n",
" \"base_image\": \"mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04\",\n",
" \"conda_file_path\": \"conda.yaml\"\n",
" }\n",
" }\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/open_llama/open_llama_arc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"accelerators": [ { "device": "gpu", "execution_providers": [ "CUDAExecutionProvider" ] } ],
"aml_compute": "gpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.6-cudnn8-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04",
"conda_file_path": "conda.yaml"
}
},
Expand All @@ -20,7 +20,7 @@
"accelerators": [ { "device": "gpu", "execution_providers": [ "CUDAExecutionProvider" ] } ],
"aml_compute": "olive-test",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.6-cudnn8-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04",
"conda_file_path": "conda.yaml"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def get_cpu_compute(hf_token):
"accelerators": [{"device": "CPU", "execution_providers": ["CPUExecutionProvider"]}],
"aml_compute": "cpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
"conda_file_path": "conda.yaml",
},
"is_dev": True,
Expand Down
2 changes: 1 addition & 1 deletion olive/systems/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04

RUN apt-get -y update && ACCEPT_EULA=Y apt-get -y upgrade
RUN pip install azure-ai-ml \
Expand Down
2 changes: 1 addition & 1 deletion olive/systems/docker/Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mcr image https://github.com/microsoft/mcr
# tag list https://mcr.microsoft.com/v2/azureml/openmpi4.1.0-cuda11.6-cudnn8-ubuntu20.04/tags/list
FROM mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.6-cudnn8-ubuntu20.04
FROM mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
4 changes: 2 additions & 2 deletions test/integ_test/aml_model_test/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: project_environment
channels:
- defaults
dependencies:
- python=3.8.13
- python=3.10.16
- pip=22.3.1
- pip:
- azure-ai-ml
Expand All @@ -11,6 +11,6 @@ dependencies:
- onnxruntime
- datasets
- scipy
- transformers
- transformers==4.31.0 # TODO(team): 55036 Fixed error and update to latest version
- onnxconverter_common
- git+https://github.com/microsoft/Olive.git
2 changes: 1 addition & 1 deletion test/integ_test/aml_model_test/test_aml_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_aml_model_pass_run(tmp_path):
workspace_config = get_olive_workspace_config()
azureml_client_config = AzureMLClientConfig(**workspace_config)
docker_config = AzureMLDockerConfig(
base_image="mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
base_image="mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
conda_file_path=conda_file_location,
)
aml_system = AzureMLSystem(
Expand Down
2 changes: 1 addition & 1 deletion test/integ_test/evaluator/azureml_eval/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get_aml_target():
conda_file_location = current_path / "conda.yaml"
azureml_client_config = AzureMLClientConfig(**get_olive_workspace_config())
docker_config = AzureMLDockerConfig(
base_image="mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
base_image="mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
conda_file_path=conda_file_location,
)
return AzureMLSystem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04

RUN apt-get -y update && ACCEPT_EULA=Y apt-get -y upgrade
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --no-cache-dir
Expand Down
6 changes: 3 additions & 3 deletions test/unit_test/systems/azureml/test_alias_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_system_alias(accelerators, expected_accelerators):
"config": {
"aml_compute": "gpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
"conda_file_path": "conda.yaml",
},
},
Expand All @@ -34,7 +34,7 @@ def test_system_alias(accelerators, expected_accelerators):
system_config = SystemConfig.parse_obj(config)
assert system_config.type == "AzureML"
assert system_config.config.aml_compute == "gpu-cluster"
assert system_config.config.aml_docker_config.base_image == "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04"
assert system_config.config.aml_docker_config.base_image == "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04"
assert system_config.config.accelerators == expected_accelerators


Expand All @@ -44,7 +44,7 @@ def test_system_alias_no_accelerators():
"config": {
"aml_compute": "gpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
"conda_file_path": "conda.yaml",
},
},
Expand Down
2 changes: 1 addition & 1 deletion test/unit_test/workflows/mock_data/readymade_system.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"accelerators": [ { "device": "gpu", "execution_providers": [ "CUDAExecutionProvider" ] } ],
"aml_compute": "gpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
"conda_file_path": "conda.yaml"
},
"is_dev": true
Expand Down
2 changes: 1 addition & 1 deletion test/unit_test/workflows/mock_data/user_script.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"accelerators": [ { "device": "CPU", "execution_providers": [ "CPUExecutionProvider" ] } ],
"aml_compute": "cpu-cluster",
"aml_docker_config": {
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
"base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04",
"conda_file_path": "conda.yaml"
},
"is_dev": true
Expand Down

0 comments on commit 0e328a5

Please sign in to comment.