Hi, I'm trying to build OSS with this command in TRT20.06 container as the comment said
bash /opt/tensorrt/build_opensource.sh
And some error messages came out together.
root@28fc4783c498:/opt/tensorrt# bash install_opensource.sh
/opt/tensorrt
Cloning into 'TensorRT'...
remote: Enumerating objects: 129, done.
remote: Counting objects: 100% (129/129), done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 2004 (delta 41), reused 96 (delta 35), pack-reused 1875
Receiving objects: 100% (2004/2004), 2.06 MiB | 1.77 MiB/s, done.
Resolving deltas: 100% (1188/1188), done.
Note: checking out 'e32ba1cf581d1c6eeb59020be838b6ba026327eb'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
Copying OSS headers to /usr/include/x86_64-linux-gnu/...
Done!
Initializing submodules...
Submodule 'parsers/onnx' (https://github.com/onnx/onnx-tensorrt.git) registered for path 'parsers/onnx'
Submodule 'third_party/cub' (https://github.com/NVlabs/cub.git) registered for path 'third_party/cub'
Submodule 'third_party/protobuf' (https://github.com/protocolbuffers/protobuf.git) registered for path 'third_party/protobuf'
Cloning into '/opt/tensorrt/TensorRT/parsers/onnx'...
Cloning into '/opt/tensorrt/TensorRT/third_party/cub'...
Cloning into '/opt/tensorrt/TensorRT/third_party/protobuf'...
Submodule path 'parsers/onnx': checked out '84b5be1d6fc03564f2c0dba85a2ee75bad242c2e'
Submodule 'third_party/onnx' (https://github.com/onnx/onnx.git) registered for path 'parsers/onnx/third_party/onnx'
Cloning into '/opt/tensorrt/TensorRT/parsers/onnx/third_party/onnx'...
Submodule path 'parsers/onnx/third_party/onnx': checked out '553df22c67bee5f0fe6599cff60f1afc6748c635'
Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'parsers/onnx/third_party/onnx/third_party/benchmark'
Submodule 'third_party/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'parsers/onnx/third_party/onnx/third_party/pybind11'
Cloning into '/opt/tensorrt/TensorRT/parsers/onnx/third_party/onnx/third_party/benchmark'...
Cloning into '/opt/tensorrt/TensorRT/parsers/onnx/third_party/onnx/third_party/pybind11'...
Submodule path 'parsers/onnx/third_party/onnx/third_party/benchmark': checked out 'e776aa0275e293707b6a0901e0e8d8a8a3679508'
Submodule path 'parsers/onnx/third_party/onnx/third_party/pybind11': checked out '09f082940113661256310e3f4811aa7261a9fa05'
Submodule 'tools/clang' (https://github.com/wjakob/clang-cindex-python3) registered for path 'parsers/onnx/third_party/onnx/third_party/pybind11/tools/clang'
Cloning into '/opt/tensorrt/TensorRT/parsers/onnx/third_party/onnx/third_party/pybind11/tools/clang'...
Submodule path 'parsers/onnx/third_party/onnx/third_party/pybind11/tools/clang': checked out '6a00cbc4a9b8e68b71caf7f774b3f9c753ae84d5'
Submodule path 'third_party/cub': checked out 'c3cceac115c072fb63df1836ff46d8c60d9eb304'
Submodule path 'third_party/protobuf': checked out 'b10d490efd6052a02a90277e3325adbec6ce62eb'
Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/protobuf/third_party/benchmark'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/protobuf/third_party/googletest'
Cloning into '/opt/tensorrt/TensorRT/third_party/protobuf/third_party/benchmark'...
Cloning into '/opt/tensorrt/TensorRT/third_party/protobuf/third_party/googletest'...
Submodule path 'third_party/protobuf/third_party/benchmark': checked out '5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8'
Submodule path 'third_party/protobuf/third_party/googletest': checked out '5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081'
Done!
Running CMAKE for OSS build...
Building for TensorRT version: 7.1.3, library version: 7
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is NVIDIA 11.0.167
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Targeting TRT Platform: x86_64
-- CUDA version set to 11.0
-- cuDNN version set to 8.0
-- Protobuf version set to 3.0.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'zlib'
-- Found CUDA: /usr/local/cuda (found suitable version "11.0", minimum required is "11.0")
-- Using libprotobuf /opt/tensorrt/TensorRT/build/third_party.protobuf/lib/libprotobuf.a
-- ========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found /usr/lib/x86_64-linux-gnu/libnvinfer.so
-- ==========================================================================================
-- ========================= Importing and creating target nvuffparser ==========================
-- Looking for library nvparsers
-- Library that was found /usr/lib/x86_64-linux-gnu/libnvparsers.so
-- ==========================================================================================
-- GPU_ARCHS is not defined. Generating CUDA code for default SMs: 35;53;61;70;75;80
-- Protobuf proto/trtcaffe.proto -> proto/trtcaffe.pb.cc proto/trtcaffe.pb.h
-- /opt/tensorrt/TensorRT/build/parsers/caffe
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not set - defaulting to Release
Generated: /opt/tensorrt/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.proto
Generated: /opt/tensorrt/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx-operators_onnx2trt_onnx-ml.proto
--
-- ******** Summary ********
-- CMake version : 3.14.4
-- CMake command : /usr/local/bin/cmake
-- System : Linux
-- C++ compiler : /usr/bin/g++
-- C++ compiler version : 7.5.0
-- CXX flags : -Wno-deprecated-declarations -DBUILD_SYSTEM=cmake_oss -Wall -Wno-deprecated-declarations -Wno-unused-function -Wnon-virtual-dtor
-- Build type : Release
-- Compile definitions : _PROTOBUF_INSTALL_DIR=/opt/tensorrt/TensorRT/build;ONNX_NAMESPACE=onnx2trt_onnx
-- CMAKE_PREFIX_PATH :
-- CMAKE_INSTALL_PREFIX : /usr/lib/x86_64-linux-gnu/..
-- CMAKE_MODULE_PATH :
--
-- ONNX version : 1.6.0
-- ONNX NAMESPACE : onnx2trt_onnx
-- ONNX_BUILD_TESTS : OFF
-- ONNX_BUILD_BENCHMARKS : OFF
-- ONNX_USE_LITE_PROTO : OFF
-- ONNXIFI_DUMMY_BACKEND : OFF
-- ONNXIFI_ENABLE_EXT : OFF
--
-- Protobuf compiler :
-- Protobuf includes :
-- Protobuf libraries :
-- BUILD_ONNX_PYTHON : OFF
-- Found TensorRT headers at /opt/tensorrt/TensorRT/include
-- Find TensorRT libs at /usr/lib/x86_64-linux-gnu/libnvinfer.so;/usr/lib/x86_64-linux-gnu/libnvinfer_plugin.so;/usr/lib/x86_64-linux-gnu/libmyelin.so
-- Found TENSORRT: /opt/tensorrt/TensorRT/include
-- Adding new sample: sample_algorithm_selector
-- - Parsers Used: caffe
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_char_rnn
-- - Parsers Used: uff;caffe;onnx
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_dynamic_reshape
-- - Parsers Used: onnx
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_fasterRCNN
-- - Parsers Used: caffe
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: sample_googlenet
-- - Parsers Used: caffe
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_int8
-- - Parsers Used: caffe
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: sample_int8_api
-- - Parsers Used: onnx
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_mlp
-- - Parsers Used: caffe
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_mnist
-- - Parsers Used: caffe
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_mnist_api
-- - Parsers Used: caffe
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_movielens
-- - Parsers Used: uff
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_movielens_mps
-- - Parsers Used: uff
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_nmt
-- - Parsers Used: none
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_onnx_mnist
-- - Parsers Used: onnx
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_plugin
-- - Parsers Used: caffe
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: sample_reformat_free_io
-- - Parsers Used: caffe
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_ssd
-- - Parsers Used: caffe
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: sample_uff_fasterRCNN
-- - Parsers Used: uff
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: sample_uff_maskRCNN
-- - Parsers Used: uff
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: sample_uff_mnist
-- - Parsers Used: uff
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_uff_plugin_v2_ext
-- - Parsers Used: uff
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Adding new sample: sample_uff_ssd
-- - Parsers Used: uff
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: sample_onnx_mnist_coord_conv_ac
-- - Parsers Used: onnx
-- - InferPlugin Used: ON
-- - Licensing: opensource
-- Adding new sample: trtexec
-- - Parsers Used: caffe;uff;onnx
-- - InferPlugin Used: OFF
-- - Licensing: opensource
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
TRT_BIN_DIR
-- Build files have been written to: /opt/tensorrt/TensorRT/build
Done!
Running make and installing libraries and trtexec...
Scanning dependencies of target third_party.protobuf
Scanning dependencies of target nvinfer_plugin_static
Scanning dependencies of target nvinfer_plugin
[ 0%] Creating directories for 'third_party.protobuf'
[ 1%] Performing download step (download, verify and extract) for 'third_party.protobuf'
...
[ 97%] Linking CXX executable ../../../sample_char_rnn
[ 97%] Built target sample_char_rnn
[ 97%] Linking CXX executable ../../../sample_int8_api
[ 97%] Built target sample_int8_api
[ 98%] Linking CXX executable ../../../sample_uff_fasterRCNN
[ 98%] Built target sample_uff_fasterRCNN
[100%] Linking CXX executable ../../../trtexec
[100%] Built target trtexec
[100%] Linking CXX executable ../../../sample_nmt
[100%] Built target sample_nmt
cp: cannot stat 'out/libnv*': No such file or directory
Done!
Copying over prerequisite files for building OSS samples to /workspace/tensorrt...
ln: failed to create symbolic link '/workspace/tensorrt/include/x86_64-linux-gnu': File exists
Done!
Replacing samples with open source versions and copying back python samples...
mv: cannot stat '/workspace/tensorrt/python_copy': No such file or directory
Done!
Cleaning up OSS directories...
Done!
cp: cannot stat 'out/libnv*': No such file or directory
It seems TRT didn't make any files on TensorRT/builder/out directory.
Is there any other right way to build oss TRT?
nvidia driver 450.51.05
Tesla T4
Regards,
Anthony Kim
Hi @dhkim0225 ,
I think that can be fixed by changing TRT_BIN_DIR to TRT_OUT_DIR, based on the CMakeLists.txt file, in this line of /opt/tensorrt/install_opensource.sh:
cmake .. -DTRT_LIB_DIR=$TRT_LIB_DIR -DTRT_BIN_DIR=$PWD/out
to
cmake .. -DTRT_LIB_DIR=$TRT_LIB_DIR -DTRT_OUT_DIR=$PWD/out
Hi @dhkim0225 ,
Looks like the 20.07 container was just released and contains these fixes. Please try the 20.07 container instead.
$ nvidia-docker run -it nvcr.io/nvidia/tensorrt:20.07-py3
$ /opt/tensorrt/install_opensource.sh
...
[100%] Linking CXX executable ../../../out/sample_nmt
[100%] Built target sample_nmt
Done!
Copying over prerequisite files for building OSS samples to /workspace/tensorrt...
Done!
Replacing samples with open source versions and copying back python samples...
Done!
Cleaning up OSS directories...
Done!
Most helpful comment
Hi @dhkim0225 ,
Looks like the 20.07 container was just released and contains these fixes. Please try the 20.07 container instead.