benz725 commented on issue #19731: URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757115024
> Did you run this successfully: > > ``` > # Build ONNX > pushd . > echo "Installing ONNX." > cd 3rdparty/onnx-tensorrt/third_party/onnx > rm -rf build > mkdir -p build > cd build > cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON .. > make -j$(nproc) > export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH > export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH > export CXXFLAGS=-I`pwd` > > popd > > # Build ONNX-TensorRT > export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib > export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/ > pushd . > cd 3rdparty/onnx-tensorrt/ > mkdir -p build > cd build > cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. > make -j$(nproc) > export LIBRARY_PATH=`pwd`:$LIBRARY_PATH > popd > > mkdir -p /work/mxnet/lib/ > cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/ > cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/ > ``` > > If yes, what is the outputs of : > > ``` > ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx > ``` > > and finally, can you verify if this path is part of `$LIBRARY_PATH`? I will tell what I have done: First, I download onnx-tensorrt from "https://github.com/onnx/onnx-tensorrt" to my /home dir, but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" to the onnx-tensorrt/third_party/onnx/ dir. Then I follow the onnx-tensorrt official tutorial, do the compile: cd onnx-tensorrt mkdir build && cd build cmake .. -DTENSORRT_ROOT=<path_to_trt> && make -j // Ensure that you update your LD_LIBRARY_PATH to pick up the location of the newly built library: export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH It can compile correctly , but I found nothing like named libonnx.so**. And when I compile the mxnet with -DTENSORRT=1, It reported error again. You said I must define some arguments , how many arguments should I have to define? Now I have the mxnet-src file in my home directory like : /home/$USER_NAME/mxnet-src and onnx-tensortrt in my home dir: /home/$USER_NAME/onnx-tensorrt and onnx in the onnx-tensorrt directory :/home/$USER_NAME/onnx-tensorrt/third_party/onnx/ How should I define the eviron arguments? You said I must follow the .sh file in the docker file, but I'm not sure how many arguments I shoud to define. Some args like ONNX_NAMESPACE, LIBRARY_PATH, LD_LIBRARY_PATH, CPLUS_INCLUDE_PATH, CXXFLAGS, should I have to define it manually? And the popd, pushd, should I have to do that like the .sh file did? I'm not very good at do compiling and define args, so thanks for your answering!! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org For additional commands, e-mail: issues-h...@mxnet.apache.org