Skip to content

Commit

Permalink
rocm manylinux now uses devtoolset 9 (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaily authored Feb 9, 2023
1 parent 4b7a407 commit 4959070
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions manywheel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ 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 @@ -151,7 +153,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 common as rocm_final
FROM cpu_final as rocm_final
ARG ROCM_VERSION=3.7
ARG PYTORCH_ROCM_ARCH
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
Expand All @@ -160,12 +162,8 @@ 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
# 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
# cmake3 is needed for the MIOpen build
RUN 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}"
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=9"
;;
*)
echo "ERROR: Unrecognized GPU_ARCH_TYPE: ${GPU_ARCH_TYPE}"
Expand Down

0 comments on commit 4959070

Please sign in to comment.