Clean up ROCm4.1 Dockerfile build directory (#7732)

* Clean up ROCm4.1 Dockerfile build directory

* remove the UCX and OMPI build directories after installation
This commit is contained in:
Peng 2021-05-20 12:04:49 -05:00 committed by GitHub
parent c91602070d
commit c2435d24ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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