Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from KellenSunderland/tensorrt_integration_2
Browse files Browse the repository at this point in the history
Fixed some build issues.
  • Loading branch information
mkolod authored Jun 22, 2018
2 parents a2cf874 + 4e57a4a commit cca282e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 34 deletions.
20 changes: 0 additions & 20 deletions ci/docker/Dockerfile.build.ubuntu_gpu_tensorrt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions ci/docker/install/tensorrt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 17 additions & 14 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit cca282e

Please sign in to comment.