Upgrade Ubuntu machine pool from 20.04 to 22.04 (#19117)

### Description
Upgrade Ubuntu machine pool from 20.04 to 22.04
This commit is contained in:
Changming Sun 2024-01-16 17:25:18 -08:00 committed by GitHub
parent e61861b0a1
commit 81d363045b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 50 additions and 60 deletions

View file

@ -28,7 +28,7 @@ stages:
artifactName: 'onnxruntime-android-full-aar'
job_name_suffix: 'Full'
publish_executables: '1'
pool_name: 'onnxruntime-Ubuntu2004-AMD-CPU'
pool_name: 'onnxruntime-Ubuntu2204-AMD-CPU'
# build Python packages
# Linux GPU only

View file

@ -246,7 +246,7 @@ stages:
workspace:
clean: all
timeoutInMinutes: 120
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
variables:
RocmVersion: '5.6'
steps:

View file

@ -19,8 +19,7 @@ variables:
jobs:
- job: Clean_Build_Docker_Image_Cache
pool:
vmImage: 'ubuntu-20.04'
pool: onnxruntime-Ubuntu2204-AMD-CPU
timeoutInMinutes: 30
@ -29,13 +28,6 @@ jobs:
submodules: false
fetchDepth: 1
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
addToPath: true
architecture: 'x64'
displayName: "Use Python 3.9"
- task: AzureCLI@2
inputs:
azureSubscription: 'AIInfraBuild'

View file

@ -126,7 +126,7 @@ stages:
BaseImage: 'registry.access.redhat.com/ubi8/ubi'
OnnxruntimeArch: 'x64'
OnnxruntimeNodejsBindingArch: 'x64'
PoolName: 'onnxruntime-Ubuntu2004-AMD-CPU'
PoolName: 'onnxruntime-Ubuntu2204-AMD-CPU'
PackageJava: false
PackageNodeJS: false
# Nuget Packaging

View file

@ -46,7 +46,7 @@ stages:
skipComponentGovernanceDetection: true
ORT_CACHE_DIR: $(Agent.TempDirectory)/ort_ccache
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
steps:
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
@ -123,7 +123,7 @@ stages:
skipComponentGovernanceDetection: true
ORT_CACHE_DIR: $(Agent.TempDirectory)/ort_ccache
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
steps:
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'

View file

@ -43,7 +43,7 @@ jobs:
variables:
CCACHE_DIR: $(Agent.TempDirectory)/ccache
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
steps:
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'

View file

@ -51,7 +51,7 @@ jobs:
timeoutInMinutes: 120
workspace:
clean: all
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
steps:
- checkout: self
clean: true

View file

@ -64,7 +64,7 @@ jobs:
CCACHE_DIR: $(Pipeline.Workspace)/ccache
workspace:
clean: all
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
steps:
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'

View file

@ -46,7 +46,7 @@ jobs:
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
workspace:
clean: all
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
timeoutInMinutes: 120
steps:

View file

@ -41,7 +41,7 @@ stages:
parameters:
NpmPackagingMode: ${{ variables.NpmPackagingMode }}
IsReleasePipeline: true
PoolName: 'onnxruntime-Ubuntu2004-AMD-CPU'
PoolName: 'onnxruntime-Ubuntu2204-AMD-CPU'
PackageName: 'onnxruntime-web'
ExtraBuildArgs: ''
UseWebPoolName: true
@ -54,7 +54,7 @@ stages:
parameters:
NpmPackagingMode: ${{ variables.NpmPackagingMode }}
BuildConfig: 'Release'
PoolName: 'onnxruntime-Ubuntu2004-AMD-CPU'
PoolName: 'onnxruntime-Ubuntu2204-AMD-CPU'
PackageName: 'onnxruntime-react-native'
BuildAndroidAARStageDependsOn: 'Precheck_and_extract_commit'

View file

@ -1,5 +1,5 @@
parameters:
AgentPool: 'onnxruntime-Ubuntu2004-AMD-CPU'
AgentPool: 'onnxruntime-Ubuntu2204-AMD-CPU'
ArtifactSuffix: ''
NugetPackageName : ''
StageSuffix: 'CPU'

View file

@ -44,7 +44,7 @@ jobs:
skipComponentGovernanceDetection: true
CCACHE_DIR: $(Pipeline.Workspace)/ccache
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
pool: onnxruntime-Ubuntu-2004-Training-CPU
pool: onnxruntime-Ubuntu-2204-Training-CPU
steps:
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'

View file

@ -37,7 +37,7 @@ jobs:
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
workspace:
clean: all
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
timeoutInMinutes: 120
steps:
@ -132,7 +132,7 @@ jobs:
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
workspace:
clean: all
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
timeoutInMinutes: 120
steps:

View file

@ -16,7 +16,7 @@ stages:
timeoutInMinutes: 180
workspace:
clean: all
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
strategy:
matrix:

View file

@ -4,7 +4,7 @@ stages:
parameters:
NpmPackagingMode: 'dev'
IsReleasePipeline: true
PoolName: 'onnxruntime-Ubuntu2004-AMD-CPU'
PoolName: 'onnxruntime-Ubuntu2204-AMD-CPU'
BuildStaticLib: true
ExtraBuildArgs: ''
UseWebPoolName: true
@ -367,7 +367,7 @@ stages:
timeoutInMinutes: 150
variables:
skipComponentGovernanceDetection: true
pool: 'onnxruntime-Ubuntu2004-AMD-CPU'
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
steps:
- template: templates/set-version-number-variables-step.yml
@ -413,7 +413,7 @@ stages:
- job: AndroidCustomBuildScript
workspace:
clean: all
pool: 'onnxruntime-Ubuntu2004-AMD-CPU'
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
variables:
dockerImageTag: onnxruntime-android-custom-build
steps:

View file

@ -18,7 +18,7 @@ stages:
- template: templates/py-packaging-linux-test-cpu.yml
parameters:
arch: 'x86_64'
machine_pool: 'onnxruntime-Ubuntu2004-AMD-CPU'
machine_pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
base_image: 'registry.access.redhat.com/ubi8/ubi'
devtoolset_rootpath: /opt/rh/gcc-toolset-12/root
ld_library_path_arg: /opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib:/opt/rh/gcc-toolset-12/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-12/root/usr/lib/dyninst:/usr/local/lib64

View file

@ -105,7 +105,7 @@ stages:
- template: ../templates/py-linux-gpu.yml
parameters:
arch: 'x86_64'
machine_pool: 'onnxruntime-Ubuntu2004-AMD-CPU'
machine_pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
extra_build_arg: ${{ parameters.build_py_parameters }}
cmake_build_type: ${{ parameters.cmake_build_type }}
docker_base_image: ${{ variables.docker_base_image }}

View file

@ -20,7 +20,7 @@ stages:
dependsOn: []
jobs:
- job:
pool: 'onnxruntime-Ubuntu2004-AMD-CPU'
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
steps:
- checkout: none
- task: DownloadPipelineArtifact@2

View file

@ -33,7 +33,7 @@ parameters:
- name: pool_name
displayName: Pool name
type: string
default: 'onnxruntime-Ubuntu2004-AMD-CPU'
default: 'onnxruntime-Ubuntu2204-AMD-CPU'
- name: packageName
# now we can build onnxruntime or onnxruntime-mobile for Android, need specify it here

View file

@ -24,19 +24,17 @@ parameters:
type: string
steps:
- task: Cache@2
inputs:
${{if eq(variables['Build.SourceBranchName'], 'merge')}}:
key: ' "${{parameters.TODAY}}" | ${{parameters.AdditionalKey}} | merge '
${{else}}:
key: '"${{parameters.TODAY}}" | ${{parameters.AdditionalKey}} | $(Build.SourceVersion) '
path: ${{parameters.CacheDir}}
restoreKeys: |
"${{parameters.TODAY}}" | ${{parameters.AdditionalKey}}
displayName: Cache Task
condition: eq('${{parameters.WithCache}}', true)
- ${{if eq(parameters.WithCache, true)}}:
- task: Cache@2
inputs:
${{if eq(variables['Build.SourceBranchName'], 'merge')}}:
key: ' "${{parameters.TODAY}}" | ${{parameters.AdditionalKey}} | merge '
${{else}}:
key: '"${{parameters.TODAY}}" | ${{parameters.AdditionalKey}} | $(Build.SourceVersion) '
path: ${{parameters.CacheDir}}
restoreKeys: |
"${{parameters.TODAY}}" | ${{parameters.AdditionalKey}}
displayName: Cache Task
- script: |
set -e -x
pushd '$(Build.SourcesDirectory)/cmake/external/emsdk'

View file

@ -759,7 +759,7 @@ stages:
- template: ../nuget/templates/test_linux.yml
parameters:
AgentPool : onnxruntime-Ubuntu2004-AMD-CPU
AgentPool : onnxruntime-Ubuntu2204-AMD-CPU
NugetPackageName : 'Microsoft.ML.OnnxRuntime'
ArtifactSuffix: 'CPU'
SpecificArtifact: ${{ parameters.SpecificArtifact }}
@ -796,7 +796,7 @@ stages:
OS: Linux
BuildId: ${{ parameters.BuildId }}
SpecificArtifact: ${{ parameters.SpecificArtifact }}
PoolName: 'onnxruntime-Ubuntu2004-AMD-CPU'
PoolName: 'onnxruntime-Ubuntu2204-AMD-CPU'
- template: final-jar-testing.yml
parameters:

View file

@ -19,7 +19,7 @@ parameters:
- name: PoolName
type: string
default: 'onnxruntime-Ubuntu2004-AMD-CPU'
default: 'onnxruntime-Ubuntu2204-AMD-CPU'
- name: ArtifactNamePrefix
type: string

View file

@ -1,5 +1,5 @@
parameters:
AgentPool : 'onnxruntime-Ubuntu2004-AMD-CPU'
AgentPool : 'onnxruntime-Ubuntu2204-AMD-CPU'
StageName : 'Linux_CI_Dev'
RunDockerBuildArgs: '-o ubuntu20.04 -d cpu -x "--build_wheel"'
NuPackScript: ''

View file

@ -32,7 +32,7 @@ stages:
BaseImage: 'registry.access.redhat.com/ubi8/ubi'
OnnxruntimeArch: 'x64'
OnnxruntimeNodejsBindingArch: 'x64'
PoolName: 'onnxruntime-Ubuntu2004-AMD-CPU'
PoolName: 'onnxruntime-Ubuntu2204-AMD-CPU'
ArtifactNamePrefix: ${{ parameters.ArtifactNamePrefix }}
PackageJava: ${{ parameters.PackageJava }}
PackageNodeJS: ${{ parameters.PackageNodeJS }}

View file

@ -13,7 +13,7 @@ parameters:
- name: PoolName
type: string
default: 'onnxruntime-Ubuntu2004-AMD-CPU'
default: 'onnxruntime-Ubuntu2204-AMD-CPU'
- name: SkipPublish
type: boolean

View file

@ -336,7 +336,7 @@ stages:
- template: ../nuget/templates/test_linux.yml
parameters:
AgentPool : onnxruntime-Ubuntu2004-AMD-CPU
AgentPool : onnxruntime-Ubuntu2204-AMD-CPU
NugetPackageName : 'Microsoft.ML.OnnxRuntime.Training'
ArtifactSuffix: 'Training-CPU'
StageSuffix: 'Training_CPU'

View file

@ -48,7 +48,7 @@ stages:
timeoutInMinutes: 90
workspace:
clean: all
pool: onnxruntime-Ubuntu2004-AMD-CPU
pool: onnxruntime-Ubuntu2204-AMD-CPU
strategy:
matrix:
${{ each PythonVersion in parameters.python_version }}:

View file

@ -430,7 +430,7 @@ stages:
- template: py-linux.yml
parameters:
arch: 'x86_64'
machine_pool: 'onnxruntime-Ubuntu2004-AMD-CPU'
machine_pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
base_image: 'registry.access.redhat.com/ubi8/ubi'
devtoolset_rootpath: /opt/rh/gcc-toolset-12/root
ld_library_path_arg: /opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib:/opt/rh/gcc-toolset-12/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-12/root/usr/lib/dyninst:/usr/local/lib64
@ -443,6 +443,6 @@ stages:
- template: py-linux-gpu.yml
parameters:
arch: 'x86_64'
machine_pool: 'onnxruntime-Ubuntu2004-AMD-CPU'
machine_pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
extra_build_arg: ${{ parameters.build_py_parameters }}
cmake_build_type: ${{ parameters.cmake_build_type }}

View file

@ -14,7 +14,7 @@ jobs:
workspace:
clean: all
timeoutInMinutes: 180
pool: Ubuntu-2004-rocm-aiinfra
pool: Ubuntu-2204-rocm-aiinfra
variables:
- name: PythonVersion
value: ${{ parameters.PythonVersion }}

View file

@ -53,7 +53,7 @@ stages:
parameters:
NpmPackagingMode: ${{ variables.NpmPackagingMode }}
IsReleasePipeline: false
PoolName: 'onnxruntime-Ubuntu2004-AMD-CPU'
PoolName: 'onnxruntime-Ubuntu2204-AMD-CPU'
BuildStaticLib: true
ExtraBuildArgs: $(ExtraBuildArgs)
WASMTemplate: linux-wasm-ci.yml

View file

@ -7,9 +7,9 @@ mkdir -p /build/dist
EXTRA_ARG=""
# Put 3.8 at the last because Ubuntu 20.04 use python 3.8 and we will upload the intermediate build files of this
# config to Azure DevOps Artifacts and download them to a Ubuntu 20.04 machine to run the tests.
PYTHON_EXES=("/opt/python/cp39-cp39/bin/python3.9" "/opt/python/cp310-cp310/bin/python3.10" "/opt/python/cp311-cp311/bin/python3.11" "/opt/python/cp312-cp312/bin/python3.12" "/opt/python/cp38-cp38/bin/python3.8")
# Put 3.8 at the last because Ubuntu 22.04 use python 3.10 and we will upload the intermediate build files of this
# config to Azure DevOps Artifacts and download them to a Ubuntu 22.04 machine to run the tests.
PYTHON_EXES=("/opt/python/cp38-cp38/bin/python3.8" "/opt/python/cp39-cp39/bin/python3.9" "/opt/python/cp311-cp311/bin/python3.11" "/opt/python/cp312-cp312/bin/python3.12" "/opt/python/cp310-cp310/bin/python3.10")
while getopts "d:p:x:c:" parameter_Option
do case "${parameter_Option}"
in

View file

@ -15,7 +15,7 @@ c) BUILD_CONFIG=${OPTARG};;
esac
done
export PATH=/opt/python/cp38-cp38/bin:$PATH
export PATH=/opt/python/cp310-cp310/bin:$PATH
cd /build
files=(whl/*.whl)
FILE_NAME="${files[0]}"