From c2435d24ecbeededf1dc50187ab3bd11ad4a6994 Mon Sep 17 00:00:00 2001 From: Peng Date: Thu, 20 May 2021 12:04:49 -0500 Subject: [PATCH] Clean up ROCm4.1 Dockerfile build directory (#7732) * Clean up ROCm4.1 Dockerfile build directory * remove the UCX and OMPI build directories after installation --- orttraining/tools/amdgpu/Dockerfile.rocm4.1.pytorch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/orttraining/tools/amdgpu/Dockerfile.rocm4.1.pytorch b/orttraining/tools/amdgpu/Dockerfile.rocm4.1.pytorch index 4920fb3e10..0a10760274 100644 --- a/orttraining/tools/amdgpu/Dockerfile.rocm4.1.pytorch +++ b/orttraining/tools/amdgpu/Dockerfile.rocm4.1.pytorch @@ -73,7 +73,9 @@ RUN git clone https://github.com/openucx/ucx.git \ && cd build \ && ../contrib/configure-opt --prefix=$UCX_DIR --without-rocm --without-knem --without-cuda \ && make -j"$(nproc)" \ - && make install + && make install \ + && cd .. \ + && rm -rf build # OpenMPI # note: require --enable-orterun-prefix-by-default for Azure machine learning compute @@ -93,6 +95,8 @@ RUN git clone --recursive https://github.com/open-mpi/ompi.git \ --enable-mca-no-build=btl-uct --disable-mpi-fortran \ && make -j"$(nproc)" \ && make install \ + && cd .. \ + && rm -rf build \ && ldconfig \ && test -f ${OPENMPI_DIR}/bin/mpic++ @@ -128,6 +132,7 @@ RUN git clone --recursive https://github.com/microsoft/onnxruntime.git \ --enable_training \ && test -f $ORT_DIR/build/RelWithDebInfo/onnxruntime_training_bert \ && pip install $ORT_DIR/build/RelWithDebInfo/dist/*.whl \ + && rm -rf $ORT_DIR/build \ && ldconfig # ONNX Runtime Training Examples