Skip to content

Commit

Permalink
Revert "rocm manylinux now uses devtoolset 9 (pytorch#1300)"
Browse files Browse the repository at this point in the history
This reverts commit 4959070.
  • Loading branch information
jataylo committed Feb 16, 2023
1 parent 4b4920d commit ff2edc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions manywheel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ RUN yum install -y devtoolset-${DEVTOOLSET_VERSION}-gcc devtoolset-${DEVTOOLSET_
ENV PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH

# cmake is already installed inside the rocm base image, so remove if present
RUN rpm -e cmake || true
# cmake-3.18.4 from pip
RUN yum install -y python3-pip && \
python3 -mpip install cmake==3.18.4 && \
Expand All @@ -153,7 +151,7 @@ RUN rm -rf /usr/local/cuda-${BASE_CUDA_VERSION}
COPY --from=cuda /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
COPY --from=magma /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}

FROM cpu_final as rocm_final
FROM common as rocm_final
ARG ROCM_VERSION=3.7
ARG PYTORCH_ROCM_ARCH
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
Expand All @@ -162,8 +160,12 @@ ADD ./common/install_rocm.sh install_rocm.sh
RUN ROCM_VERSION=${ROCM_VERSION} bash ./install_rocm.sh && rm install_rocm.sh
ADD ./common/install_rocm_drm.sh install_rocm_drm.sh
RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh
# cmake3 is needed for the MIOpen build
RUN ln -sf /usr/local/bin/cmake /usr/bin/cmake3
# cmake is already installed inside the rocm base image, but both 2 and 3 exist
# cmake3 is needed for pytorch build, and formerly the MIOpen build
RUN rpm -e cmake && \
pip3 install cmake==3.18.4 && \
ln -sf /usr/local/bin/cmake /usr/bin/cmake && \
ln -sf /usr/local/bin/cmake /usr/bin/cmake3
### The following is now performed beforehand in a new GPU_IMAGE with magma and miopen preinstalled
#ADD ./common/install_rocm_magma.sh install_rocm_magma.sh
#RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
Expand Down
2 changes: 1 addition & 1 deletion manywheel/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ case ${GPU_ARCH_TYPE} in
if [[ $ROCM_VERSION_INT -ge 40300 ]]; then
PYTORCH_ROCM_ARCH="${PYTORCH_ROCM_ARCH};gfx90a;gfx1030"
fi
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=9"
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH}"
;;
*)
echo "ERROR: Unrecognized GPU_ARCH_TYPE: ${GPU_ARCH_TYPE}"
Expand Down

0 comments on commit ff2edc6

Please sign in to comment.