add --parallel to speed up compiling source code

This commit is contained in:
zhijxu 2019-10-23 01:44:21 +00:00 committed by Changming Sun
parent 4eda08534f
commit 3926ce33f4
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ ENV PATH="/usr/local/go/bin:${PATH}"
WORKDIR /
RUN mkdir -p /onnxruntime/build && \
python3 /onnxruntime/tools/ci_build/build.py --build_dir /onnxruntime/build --config Release --build_server --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER)
python3 /onnxruntime/tools/ci_build/build.py --build_dir /onnxruntime/build --config Release --build_server --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER)
FROM minimal AS final
WORKDIR /onnxruntime/server/

View file

@ -22,7 +22,7 @@ RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive
/bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh
RUN cd onnxruntime &&\
/bin/sh ./build.sh --config Release --build_wheel --update --build --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) &&\
/bin/sh ./build.sh --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) &&\
pip install /code/onnxruntime/build/Linux/Release/dist/*.whl &&\
cd .. &&\
rm -rf onnxruntime cmake-3.14.3-Linux-x86_64