Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tools/ci_build/github/linux/build_linux_python_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
exit 1
fi

SHORT_CUDA_VERSION=$(echo "$CUDA_VERSION" | sed 's/\([[:digit:]]\+\.[[:digit:]]\+\)\.[[:digit:]]\+/\1/')

Check warning on line 81 in tools/ci_build/github/linux/build_linux_python_package.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 See if you can use ${variable//search/replace} instead. Raw Output: ./tools/ci_build/github/linux/build_linux_python_package.sh:81:26: info: See if you can use ${variable//search/replace} instead. (ShellCheck.SC2001)
CUDA_HOME=/usr/local/cuda-$SHORT_CUDA_VERSION
if [ ! -d "$CUDA_HOME" ] && [ -d /usr/local/cuda ]; then
# Allow the cu13 packaging flow to run on images that expose a newer CUDA minor version via /usr/local/cuda.
Expand Down Expand Up @@ -124,7 +124,12 @@
# like xnnpack's cmakefile, it uses pythone3 to run a external command
python3_dir=$(dirname "$PYTHON_EXE")
ls "$python3_dir"
${PYTHON_EXE} -m pip install -r /onnxruntime_src/tools/ci_build/github/linux/python/requirements.txt
PIP_REQUIREMENTS=(-r /onnxruntime_src/tools/ci_build/github/linux/python/requirements.txt)
if [[ "${PYTHON_EXE}" == */cp313-cp313t/* ]]; then
# mypy 1.19+ dependencies do not support free-threaded CPython 3.13.
PIP_REQUIREMENTS+=("mypy<1.19")
fi
"${PYTHON_EXE}" -m pip install "${PIP_REQUIREMENTS[@]}"
PATH=$python3_dir:$PATH ${PYTHON_EXE} /onnxruntime_src/tools/ci_build/build.py "${BUILD_ARGS[@]}"
cp /build/"$BUILD_CONFIG"/dist/*.whl /build/dist
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ FROM $BASEIMAGE
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

RUN python3 -m pip install flatbuffers
RUN dnf install -y perl-core && dnf clean all

RUN --mount=type=secret,id=PIP_INDEX_URL,required=false \
if [ -f /run/secrets/PIP_INDEX_URL ]; then export PIP_INDEX_URL=$(cat /run/secrets/PIP_INDEX_URL); fi && \
python3 -m pip install flatbuffers

ARG BUILD_UID=1001
ARG BUILD_USER=onnxruntimedev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
os_major_version=$(tr -dc '0-9.' </etc/redhat-release | cut -d \. -f1)

echo "installing for os major version : $os_major_version"
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-core openssl-devel wget

if ! command -v ccache &>/dev/null; then
dnf install -y ccache # FIXME: base image should already have ccache installed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
PYTHON_EXES=("/opt/python/cp311-cp311/bin/python3.11" "/opt/python/cp312-cp312/bin/python3.12" "/opt/python/cp313-cp313/bin/python3.13" "/opt/python/cp313-cp313t/bin/python3.13" "/opt/python/cp314-cp314/bin/python3.14" "/opt/python/cp314-cp314t/bin/python3.14")
CURRENT_DIR=$(pwd)
if ! [ -x "$(command -v protoc)" ]; then
$CURRENT_DIR/install_protobuf.sh

Check warning on line 7 in tools/ci_build/github/linux/docker/inference/aarch64/python/cpu/scripts/install_deps.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/linux/docker/inference/aarch64/python/cpu/scripts/install_deps.sh:7:3: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
fi
popd
export ONNX_ML=1
Expand All @@ -12,5 +12,10 @@

for PYTHON_EXE in "${PYTHON_EXES[@]}"
do
${PYTHON_EXE} -m pip install -r requirements.txt
PIP_REQUIREMENTS=(-r requirements.txt)
if [[ "${PYTHON_EXE}" == */cp313-cp313t/* ]]; then
# mypy 1.19+ dependencies do not support free-threaded CPython 3.13.
PIP_REQUIREMENTS+=("mypy<1.19")
fi
"${PYTHON_EXE}" -m pip install "${PIP_REQUIREMENTS[@]}"
done
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ os_major_version=$(tr -dc '0-9.' < /etc/redhat-release |cut -d \. -f1)

echo "installing for os major version : $os_major_version"
if [ "$os_major_version" -ge 9 ]; then
dnf install -y glibc-langpack-\* which expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
dnf install -y glibc-langpack-\* which expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl openssl-devel wget
else
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-core openssl-devel wget
fi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ FROM $BASEIMAGE
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

RUN dnf install -y perl-core && dnf clean all

ADD scripts /tmp/scripts
RUN --mount=type=secret,id=PIP_INDEX_URL,required=false \
if [ -f /run/secrets/PIP_INDEX_URL ]; then export PIP_INDEX_URL=$(cat /run/secrets/PIP_INDEX_URL); fi && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# This file is used by Zip-Nuget Packaging NoContribOps Pipeline,Zip-Nuget-Java Packaging Pipeline
ARG BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_almalinux8_gcc14_dotnet:20251017.1
FROM $BASEIMAGE

RUN dnf install -y perl-core && dnf clean all

ARG TRT_VERSION

#Install TensorRT only if TRT_VERSION is not empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# This file is used by Zip-Nuget Packaging NoContribOps Pipeline,Zip-Nuget-Java Packaging Pipeline
ARG BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda13_x64_almalinux8_gcc14_dotnet:20251107.1
FROM $BASEIMAGE

RUN dnf install -y perl-core && dnf clean all

ARG TRT_VERSION

#Install TensorRT only if TRT_VERSION is not empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e
os_major_version=$(tr -dc '0-9.' < /etc/redhat-release |cut -d \. -f1)

echo "installing for os major version : $os_major_version"
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-core openssl-devel wget
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e
os_major_version=$(tr -dc '0-9.' < /etc/redhat-release |cut -d \. -f1)

echo "installing for os major version : $os_major_version"
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-core openssl-devel wget
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e
os_major_version=$(tr -dc '0-9.' < /etc/redhat-release |cut -d \. -f1)

echo "installing for os major version : $os_major_version"
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
dnf install -y glibc-langpack-\* which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-core openssl-devel wget
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ PACKAGE_MANAGER="yum"
if [ "$os_major_version" -gt 7 ]; then
PACKAGE_MANAGER="dnf"
if [ "$os_major_version" -ge 9 ]; then
"${PACKAGE_MANAGER}" install -y which expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
"${PACKAGE_MANAGER}" install -y which expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl openssl-devel wget
else
"${PACKAGE_MANAGER}" install -y which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-IPC-Cmd openssl-devel wget
"${PACKAGE_MANAGER}" install -y which redhat-lsb-core expat-devel tar unzip zlib-devel make bzip2 bzip2-devel perl-core openssl-devel wget
fi
fi

Expand Down
Loading