Skip to content

Commit a80f1ef

Browse files
devtoolset / GCC11 upgrade on manylinux images (#76)
* Use devtoolset 11 * Set LDFLAGS and DEVTOOLSET_VERSION
1 parent 42b767f commit a80f1ef

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

manywheel/Dockerfile_2_28

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ FROM cpu_final as rocm_final
145145
ARG ROCM_VERSION=6.0
146146
ARG PYTORCH_ROCM_ARCH
147147
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
148+
ARG DEVTOOLSET_VERSION=11
149+
ENV LDFLAGS="-Wl,-rpath=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64 -Wl,-rpath=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib"
148150
# Somewhere in ROCm stack, we still use non-existing /opt/rocm/hip path,
149151
# below workaround helps avoid error
150152
ENV ROCM_PATH /opt/rocm

manywheel/build_docker.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ case ${GPU_ARCH_TYPE} in
8080
TARGET=rocm_final
8181
DOCKER_TAG=rocm${GPU_ARCH_VERSION}
8282
GPU_IMAGE=rocm/dev-centos-7:${GPU_ARCH_VERSION}-complete
83+
DEVTOOLSET_VERSION="9"
84+
if [ ${GPU_ARCH_TYPE} == "rocm-manylinux_2_28" ]; then
85+
MANY_LINUX_VERSION="2_28"
86+
DEVTOOLSET_VERSION="11"
87+
GPU_IMAGE=rocm/dev-almalinux-8:${GPU_ARCH_VERSION}-complete
88+
fi
8389
PYTORCH_ROCM_ARCH="gfx900;gfx906;gfx908;gfx90a;gfx942;gfx1030;gfx1100"
8490
ROCM_REGEX="([0-9]+)\.([0-9]+)[\.]?([0-9]*)"
8591
if [[ $GPU_ARCH_VERSION =~ $ROCM_REGEX ]]; then
@@ -88,11 +94,7 @@ case ${GPU_ARCH_TYPE} in
8894
echo "ERROR: rocm regex failed"
8995
exit 1
9096
fi
91-
if [ ${GPU_ARCH_TYPE} == "rocm-manylinux_2_28" ]; then
92-
MANY_LINUX_VERSION="2_28"
93-
GPU_IMAGE=rocm/dev-almalinux-8:${GPU_ARCH_VERSION}-complete
94-
fi
95-
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=9"
97+
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=${DEVTOOLSET_VERSION}"
9698
;;
9799
xpu)
98100
TARGET=xpu_final

0 commit comments

Comments
 (0)