onnxruntime/tools/ci_build/github/linux/docker/manylinux.patch
PeixuanZuo d80859f63d
[ROCm] fix python packaging pipeline and add python10 (#15282)
rocm python packaging pipeline failed because manylinux version and
manylinux.patch update.
1. fix duplicate `epel-release` installation issue, ROCm pipeline
install it at the begin of the dockerfile to install rocm libs. remove
duplicate installation on install-runtime-packages.sh.
```
/var/tmp/yum-root-sMRl36/epel-release-latest-7.noarch.rpm: does not update installed package.
Error: Nothing to do
```
2. add python10 to fix error below.
```
+ /opt/python/cp310-cp310/bin/python -m venv /opt/_internal/tools
build_scripts/finalize.sh: line 40: /opt/python/cp310-cp310/bin/python: No such file or directory
```
3. add python10 to rocm pipeline.

pipeline link:
https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=294776&view=results
2023-03-31 10:25:21 +08:00

88 lines
3.9 KiB
Diff

diff --git a/build-cpython.sh b/build-cpython.sh
index eea89e2..79c74d8 100755
--- a/build-cpython.sh
+++ b/build-cpython.sh
@@ -49,7 +49,7 @@ fi
CFLAGS_NODIST="${MANYLINUX_CFLAGS} ${MANYLINUX_CPPFLAGS} ${CFLAGS_EXTRA}" \
LDFLAGS_NODIST="${MANYLINUX_LDFLAGS}" \
--prefix=${PREFIX} --disable-shared --with-ensurepip=no > /dev/null
-make > /dev/null
+make -j$(nproc) > /dev/null
make install > /dev/null
popd
rm -rf Python-${CPYTHON_VERSION} Python-${CPYTHON_VERSION}.tgz Python-${CPYTHON_VERSION}.tgz.asc
diff --git a/build-git.sh b/build-git.sh
index 9c0b02d..2e2919c 100755
--- a/build-git.sh
+++ b/build-git.sh
@@ -27,7 +27,7 @@ fetch_source ${GIT_ROOT}.tar.gz ${GIT_DOWNLOAD_URL}
check_sha256sum ${GIT_ROOT}.tar.gz ${GIT_HASH}
tar -xzf ${GIT_ROOT}.tar.gz
pushd ${GIT_ROOT}
-make install prefix=/usr/local NO_GETTEXT=1 NO_TCLTK=1 DESTDIR=/manylinux-rootfs CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" CXXFLAGS="${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS}"
+make -j$(nproc) install prefix=/usr/local NO_GETTEXT=1 NO_TCLTK=1 DESTDIR=/manylinux-rootfs CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" CXXFLAGS="${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS}"
popd
rm -rf ${GIT_ROOT} ${GIT_ROOT}.tar.gz
diff --git a/build-openssl.sh b/build-openssl.sh
index 668deb6..5f3f5d5 100755
--- a/build-openssl.sh
+++ b/build-openssl.sh
@@ -40,7 +40,7 @@ check_sha256sum ${OPENSSL_ROOT}.tar.gz ${OPENSSL_HASH}
tar -xzf ${OPENSSL_ROOT}.tar.gz
pushd ${OPENSSL_ROOT}
./config no-shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS} -fPIC" CXXFLAGS="${MANYLINUX_CXXFLAGS} -fPIC" LDFLAGS="${MANYLINUX_LDFLAGS} -fPIC" > /dev/null
-make > /dev/null
+make -j$(nproc) > /dev/null
make install_sw > /dev/null
popd
rm -rf ${OPENSSL_ROOT} ${OPENSSL_ROOT}.tar.gz
diff --git a/build_utils.sh b/build_utils.sh
index 961e34d..55ae11b 100755
--- a/build_utils.sh
+++ b/build_utils.sh
@@ -52,7 +52,7 @@ function check_sha256sum {
function do_standard_install {
./configure "$@" CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" "CXXFLAGS=${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS}" > /dev/null
- make > /dev/null
+ make -j$(nproc) > /dev/null
make install > /dev/null
}
diff --git a/install-entrypoint.sh b/install-entrypoint.sh
index 9ef1e99..ec52833 100755
--- a/install-entrypoint.sh
+++ b/install-entrypoint.sh
@@ -26,3 +26,8 @@ fi
if [ "${AUDITWHEEL_POLICY}" = "musllinux_1_1" ]; then
apk add --no-cache bash
fi
+
+if command -v yum 2>&1 ; then
+ yum install -y yum-plugin-versionlock
+ yum versionlock cuda* libcudnn* libnccl*
+fi
\ No newline at end of file
diff --git a/install-runtime-packages.sh b/install-runtime-packages.sh
index 137d2e2..bd329f4 100755
--- a/install-runtime-packages.sh
+++ b/install-runtime-packages.sh
@@ -73,9 +73,14 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
# Software collection (for devtoolset-10)
yum -y install centos-release-scl-rh
- # EPEL support (for yasm)
- yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm"
+ if [[ -d /opt/rocm ]]; then
+ TOOLCHAIN_DEPS="devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-gcc-gfortran"
+ else
+ # EPEL support (for yasm)
+ yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+ TOOLCHAIN_DEPS="devtoolset-11-binutils devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran"
+ fi
+ TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm"
elif [ "${AUDITWHEEL_ARCH}" == "aarch64" ] || [ "${AUDITWHEEL_ARCH}" == "ppc64le" ] || [ "${AUDITWHEEL_ARCH}" == "s390x" ]; then
# Software collection (for devtoolset-10)
yum -y install centos-release-scl-rh