diff --git a/ci/docker/Dockerfile.build.ubuntu_gpu_tensorrt b/ci/docker/Dockerfile.build.ubuntu_gpu_tensorrt index 9f72e0a420bb..e4dad514116f 100755 --- a/ci/docker/Dockerfile.build.ubuntu_gpu_tensorrt +++ b/ci/docker/Dockerfile.build.ubuntu_gpu_tensorrt @@ -28,26 +28,6 @@ COPY install/ubuntu_ccache.sh /work/ RUN /work/ubuntu_ccache.sh COPY install/ubuntu_python.sh /work/ RUN /work/ubuntu_python.sh -COPY install/ubuntu_scala.sh /work/ -RUN /work/ubuntu_scala.sh -COPY install/ubuntu_r.sh /work/ -RUN /work/ubuntu_r.sh -COPY install/ubuntu_perl.sh /work/ -RUN /work/ubuntu_perl.sh -COPY install/ubuntu_clang.sh /work/ -RUN /work/ubuntu_clang.sh -COPY install/ubuntu_mklml.sh /work/ -RUN /work/ubuntu_mklml.sh -COPY install/ubuntu_tvm.sh /work/ -RUN /work/ubuntu_tvm.sh -COPY install/ubuntu_llvm.sh /work/ -RUN /work/ubuntu_llvm.sh -COPY install/ubuntu_caffe.sh /work/ -RUN /work/ubuntu_caffe.sh -COPY install/ubuntu_docs.sh /work/ -RUN /work/ubuntu_docs.sh -COPY install/ubuntu_tutorials.sh /work/ -RUN /work/ubuntu_tutorials.sh COPY install/tensorrt.sh /work RUN /work/tensorrt.sh diff --git a/ci/docker/install/tensorrt.sh b/ci/docker/install/tensorrt.sh index 77259b81ed15..89c35466c5e9 100755 --- a/ci/docker/install/tensorrt.sh +++ b/ci/docker/install/tensorrt.sh @@ -31,6 +31,8 @@ # Install protoc 3.5 and build protobuf here (for onnx and onnx-tensorrt) pushd . cd .. +apt-get update +apt-get install -y automake libtool git clone --recursive -b 3.5.1.1 https://github.com/google/protobuf.git cd protobuf ./autogen.sh diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 1c53ea19e67e..007ae7e8e6ea 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -440,33 +440,36 @@ build_ubuntu_gpu() { build_ubuntu_gpu_tensorrt() { set -ex + + # Build ONNX pushd . - pushd . - # Install ONNX echo "TensorRT build enabled. Installing ONNX." + cd 3rdparty/onnx-tensorrt/third_party/onnx rm -rf build mkdir build cd build - cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON .. - make -j$(nproc) - make install - ldconfig - cd .. - mkdir /usr/include/x86_64-linux-gnu/onnx - cp build/onnx/onnx*pb.* /usr/include/x86_64-linux-gnu/onnx - cp build/libonnx.so /usr/local/lib - ldconfig + cmake \ + -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER}\ + -DBUILD_SHARED_LIBS=ON ..\ + -G Ninja + ninja -v + mkdir /work/mxnet/onnx/ + cp onnx/onnx*pb.* /work/mxnet/onnx/ + mkdir /work/mxnet/deps/ + cp libonnx.so /work/mxnet/deps/lib popd - # Install ONNX-TensorRT + + # Build ONNX-TensorRT + pushd . cd 3rdparty/onnx-tensorrt/ mkdir build cd build cmake .. make -j$(nproc) - make install - ldconfig + # make install popd + rm -rf build make \ DEV=1 \ USE_BLAS=openblas \