File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ ENV PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin
49
49
RUN curl -s -q https://glide.sh/get | sh
50
50
51
51
# Install TensorRT
52
- # The unnecessary files has been removed to make the library small. It only contains include and lib now.
52
+ # following TensorRT.tar.gz is not the default official one, we do two miny changes:
53
+ # 1. Remove the unnecessary files to make the library small. TensorRT.tar.gz only contains include and lib now,
54
+ # and its size is only one-third of the official one.
55
+ # 2. Manually add ~IPluginFactory() in IPluginFactory class of NvInfer.h, otherwise, it couldn't work in paddle.
56
+ # See https://github.com/PaddlePaddle/Paddle/issues/10129 for details.
53
57
RUN wget -qO- http://paddlepaddledeps.bj.bcebos.com/TensorRT-4.0.0.3.Ubuntu-16.04.4.x86_64-gnu.cuda-8.0.cudnn7.0.tar.gz | \
54
58
tar -xz -C /usr/local && \
55
59
cp -rf /usr/local/TensorRT/include /usr && \
Original file line number Diff line number Diff line change @@ -30,4 +30,6 @@ if(TENSORRT_FOUND)
30
30
31
31
message (STATUS "Current TensorRT header is ${TENSORRT_INCLUDE_DIR} /NvInfer.h. "
32
32
"Current TensorRT version is v${TENSORRT_MAJOR_VERSION} . " )
33
+ include_directories (${TENSORRT_INCLUDE_DIR} )
34
+ list (APPEND EXTERNAL_LIBS ${TENSORRT_LIBRARY} )
33
35
endif ()
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ endif()
21
21
22
22
if (WITH_TESTING )
23
23
add_subdirectory (tests/book )
24
- if (TENSORRT_FOUND )
25
- add_subdirectory (tensorrt )
26
- endif ()
24
+ endif ()
25
+
26
+ if (TENSORRT_FOUND )
27
+ add_subdirectory (tensorrt )
27
28
endif ()
You can’t perform that action at this time.
0 commit comments