Skip to content

Commit 44e541e

Browse files
authored
Update docker images (#1172)
The new images contain the following updates: 1. Added Git, Ninja and VCPKG to all docker images 2. Updated CPU containers' GCC version from 12 to 14 3. Pinned CUDA 12 images' CUDNN version to 9.5(The latest one is 9.6) 4. Addressed container supply chain warnings by building CUDA 12 images from scratch(avoid using Nvidia's prebuilt images) 5. Updated manylinux commit id to 75aeda9d18eafb323b00620537c8b4097d4bef48 6. python 3.8 and 3.9 were removed.
1 parent 636a95e commit 44e541e

File tree

10 files changed

+18
-110
lines changed

10 files changed

+18
-110
lines changed

.pipelines/stages/jobs/nuget-validation-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ jobs:
100100

101101
- name: cuda_docker_image
102102
${{ if eq(parameters.cuda_version, '11.8') }}:
103-
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20240531.1
103+
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20250109.1
104104
${{ else }}:
105-
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1
105+
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20250109.1
106106

107107
workspace:
108108
clean: all

.pipelines/stages/jobs/py-validation-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ jobs:
109109

110110
- name: cuda_docker_image
111111
${{ if eq(parameters.cuda_version, '11.8') }}:
112-
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20240531.1
112+
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20250109.1
113113
${{ else }}:
114-
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1
114+
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20250109.1
115115

116116
steps:
117117
- checkout: self

tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cpu_aarch64_ubi8_gcc12:20240531.1
4+
FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cpu_aarch64_ubi8_gcc14:20250109.1
55

66
ADD scripts /tmp/scripts
77
RUN cd /tmp/scripts && /tmp/scripts/install_centos.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts

tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/scripts/install_centos.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ dnf install -y \
99
glibc-langpack-\* glibc-locale-source which redhat-lsb-core \
1010
expat-devel tar unzip zlib-devel make bzip2 bzip2-devel \
1111
java-11-openjdk-devel graphviz \
12-
gcc-toolset-12-binutils gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-gcc-gfortran \
1312
git
1413
locale

tools/ci_build/github/linux/docker/manylinux/Dockerfile.manylinux2_28_cpu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cpu_x64_ubi8_gcc12:20240530.3
1+
FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cpu_x64_ubi8_gcc14:20250109.1
22

33
ADD scripts /tmp/scripts
4-
RUN cd /tmp/scripts && /tmp/scripts/install_centos_gcc12.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts
4+
RUN cd /tmp/scripts && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts
55

66
ARG BUILD_UID=1001
77
ARG BUILD_USER=onnxruntimedev
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
ARG BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20240530.3
1+
ARG BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20250109.1
22

33
FROM $BASEIMAGE
44
ADD scripts /tmp/scripts
55

6-
RUN if [ "$(echo $CUDA_VERSION | cut -d. -f1)" -ge 12 ]; then \
7-
echo "Using GCC 12 because CUDA version is greater than or equal to 12"; \
8-
cd /tmp/scripts && /tmp/scripts/install_centos_gcc12.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts; \
9-
else \
10-
echo "Using default gcc because CUDA version is less than 12"; \
11-
cd /tmp/scripts && /tmp/scripts/install_centos.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts; \
12-
fi
6+
RUN cd /tmp/scripts && /tmp/scripts/install_centos.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts;
7+
138

149
ARG BUILD_UID=1001
1510
ARG BUILD_USER=onnxruntimedev
@@ -18,4 +13,4 @@ WORKDIR /home/$BUILD_USER
1813
USER $BUILD_USER
1914
ENV PATH /usr/local/dotnet:$PATH
2015
ENV CUDAHOSTCXX /opt/rh/gcc-toolset-11/root/usr/bin/g++
21-
ENV CUDA_MODULE_LOADING "LAZY"
16+
ENV CUDA_MODULE_LOADING "LAZY"
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
ARG BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1
1+
ARG BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20250109.1
22

33
FROM $BASEIMAGE
44
ADD scripts /tmp/scripts
55

6-
RUN if [ "$(echo $CUDA_VERSION | cut -d. -f1)" -ge 12 ]; then \
7-
echo "Using GCC 12 because CUDA version is greater than or equal to 12"; \
8-
cd /tmp/scripts && /tmp/scripts/install_centos_gcc12.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts; \
9-
else \
10-
echo "Using default gcc because CUDA version is less than 12"; \
11-
cd /tmp/scripts && /tmp/scripts/install_centos.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts; \
12-
fi
6+
RUN cd /tmp/scripts && /tmp/scripts/install_centos.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts
7+
138
ARG BUILD_UID=1001
149
ARG BUILD_USER=onnxruntimedev
1510
RUN adduser --uid $BUILD_UID $BUILD_USER
1611
WORKDIR /home/$BUILD_USER
1712
USER $BUILD_USER
1813
ENV PATH /usr/local/dotnet:$PATH
1914
ENV CUDAHOSTCXX /opt/rh/gcc-toolset-12/root/usr/bin/g++
20-
ENV CUDA_MODULE_LOADING "LAZY"
15+
ENV CUDA_MODULE_LOADING "LAZY"

tools/ci_build/github/linux/docker/manylinux/Dockerfile.manylinux2_28_rocm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cpu_x64_ubi8_gcc12:20240530.3
1+
FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cpu_x64_ubi8_gcc14:20250109.1
22

33
ADD scripts /tmp/scripts
4-
RUN cd /tmp/scripts && /tmp/scripts/install_centos_gcc12.sh && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts
4+
RUN cd /tmp/scripts && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts
55

66
ARG BUILD_UID=1001
77
ARG BUILD_USER=onnxruntimedev

tools/ci_build/github/linux/docker/manylinux/scripts/install_centos_gcc12.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e -x
33
pushd .
4-
PYTHON_EXES=("/opt/python/cp38-cp38/bin/python3.8" "/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")
4+
PYTHON_EXES=("/opt/python/cp310-cp310/bin/python3.10" "/opt/python/cp311-cp311/bin/python3.11" "/opt/python/cp312-cp312/bin/python3.12")
55

66
popd
77
export ONNX_ML=1
@@ -12,73 +12,3 @@ do
1212
${PYTHON_EXE} -m pip install -r requirements.txt
1313
done
1414

15-
# No release binary for ccache aarch64, so we need to build it from source.
16-
if ! [ -x "$(command -v ccache)" ]; then
17-
ccache_url="https://github.com/ccache/ccache/archive/refs/tags/v4.8.tar.gz"
18-
pushd .
19-
curl -sSL --retry 5 --retry-delay 10 --create-dirs --fail -L -o ccache_src.tar.gz $ccache_url
20-
mkdir ccache_main
21-
cd ccache_main
22-
tar -zxf ../ccache_src.tar.gz --strip=1
23-
24-
mkdir build
25-
cd build
26-
cmake -DCMAKE_INSTALL_PREFIX=/usr/local _DCMAKE_BUILD_TYPE=Release ..
27-
make
28-
make install
29-
which ccache
30-
popd
31-
rm -f ccache_src.tar.gz
32-
rm -rf ccache_src
33-
fi
34-
35-
# Download a file from internet
36-
function GetFile {
37-
local uri=$1
38-
local path=$2
39-
local force=${3:-false}
40-
local download_retries=${4:-5}
41-
local retry_wait_time_seconds=${5:-30}
42-
43-
if [[ -f $path ]]; then
44-
if [[ $force = false ]]; then
45-
echo "File '$path' already exists. Skipping download"
46-
return 0
47-
else
48-
rm -rf "$path"
49-
fi
50-
fi
51-
52-
if [[ -f $uri ]]; then
53-
echo "'$uri' is a file path, copying file to '$path'"
54-
cp "$uri" "$path"
55-
return $?
56-
fi
57-
58-
echo "Downloading $uri"
59-
curl "$uri" -sSL --retry $download_retries --retry-delay $retry_wait_time_seconds --create-dirs -o "$path" --fail
60-
return $?
61-
}
62-
mkdir -p /tmp/src
63-
64-
cd /tmp/src
65-
66-
CPU_ARCH=$(uname -m)
67-
68-
# Install CMake
69-
echo "Installing cmake"
70-
GetFile "https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1-linux-$CPU_ARCH.tar.gz" "/tmp/src/cmake.tar.gz"
71-
tar -zxf /tmp/src/cmake.tar.gz --strip=1 -C /usr
72-
73-
# Install Ninja
74-
echo "Installing Ninja"
75-
GetFile https://github.com/ninja-build/ninja/archive/v1.10.0.tar.gz /tmp/src/ninja-linux.tar.gz
76-
tar -zxf ninja-linux.tar.gz
77-
pushd ninja-1.10.0
78-
cmake -Bbuild-cmake -H.
79-
cmake --build build-cmake
80-
mv ./build-cmake/ninja /usr/bin
81-
popd
82-
83-
cd /
84-
rm -rf /tmp/src

0 commit comments

Comments
 (0)