Skip to content

Commit 1344be2

Browse files
jeffdailyjithunnair-amd
authored andcommitted
rocm manylinux now uses devtoolset 9 (pytorch#1300)
(cherry picked from commit 4959070)
1 parent 0832285 commit 1344be2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

manywheel/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ RUN yum install -y devtoolset-${DEVTOOLSET_VERSION}-gcc devtoolset-${DEVTOOLSET_
143143
ENV PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH
144144
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH
145145

146+
# cmake is already installed inside the rocm base image, so remove if present
147+
RUN rpm -e cmake || true
146148
# cmake-3.18.4 from pip
147149
RUN yum install -y python3-pip && \
148150
python3 -mpip install cmake==3.18.4 && \
@@ -157,7 +159,7 @@ RUN rm -rf /usr/local/cuda-${BASE_CUDA_VERSION}
157159
COPY --from=cuda /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
158160
COPY --from=magma /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
159161

160-
FROM common as rocm_final
162+
FROM cpu_final as rocm_final
161163
ARG ROCM_VERSION=3.7
162164
ARG PYTORCH_ROCM_ARCH
163165
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
@@ -168,3 +170,5 @@ ADD ./common/install_rocm_drm.sh install_rocm_drm.sh
168170
RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh
169171
ADD ./common/install_rocm_magma.sh install_rocm_magma.sh
170172
RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
173+
# cmake3 is needed for the MIOpen build
174+
RUN ln -sf /usr/local/bin/cmake /usr/bin/cmake3

manywheel/build_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ case ${GPU_ARCH_TYPE} in
5656
if [[ $ROCM_VERSION_INT -ge 40300 ]]; then
5757
PYTORCH_ROCM_ARCH="${PYTORCH_ROCM_ARCH};gfx90a;gfx1030"
5858
fi
59-
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH}"
59+
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=9"
6060
;;
6161
*)
6262
echo "ERROR: Unrecognized GPU_ARCH_TYPE: ${GPU_ARCH_TYPE}"

0 commit comments

Comments
 (0)