diff --git a/manywheel/Dockerfile b/manywheel/Dockerfile index fdbecd4dc..f210408d2 100644 --- a/manywheel/Dockerfile +++ b/manywheel/Dockerfile @@ -143,6 +143,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 && \ @@ -157,7 +159,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} @@ -168,3 +170,5 @@ ADD ./common/install_rocm_drm.sh install_rocm_drm.sh RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh ADD ./common/install_rocm_magma.sh install_rocm_magma.sh RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh +# cmake3 is needed for the MIOpen build +RUN ln -sf /usr/local/bin/cmake /usr/bin/cmake3 diff --git a/manywheel/build_docker.sh b/manywheel/build_docker.sh index 1b8b04e70..9b0480210 100755 --- a/manywheel/build_docker.sh +++ b/manywheel/build_docker.sh @@ -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}"