Ubuntu16.04 安裝 TensorRT(Tar 檔案安裝)
阿新 • • 發佈:2021-02-04
技術標籤:DL
去官網下載指定的TensorRT-7.0.0.11版本,詳細的安裝方法可以參考這裡
下面的安裝方法以TensorRT-7.0.0.11為例
1、解壓
將TensorRT-7.0.0.11.Ubuntu-16.04.x86_64-gnu.cuda-10.0.cudnn7.6.tar.gz 複製到機器的 /opt下
tar zxvf TensorRT-7.0.0.11.Ubuntu-16.04.x86_64-gnu.cuda-10.0.cudnn7.6.tar.gz
ls TensorRT-7.0.0.11
# bin data doc graphsurgeon include lib python samples targets TensorRT-Release-Notes.pdf uff
2、將絕對路徑新增到TensorRTLIB 目錄到環境變數 LD_LIBRARY_PATH
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/TensorRT-7.0.0.11/lib" >> /etc/profile
source /etc/profile
3、安裝Python TensorRT wheel檔案。(python 3.x)
cd TensorRT-7.0.0.11/python sudo pip3 install tensorrt-*-cp3x-none-linux_x86_64.whl cd TensorRT-7.0.0.11/uff sudo pip3 install uff-0.6.5-py2.py3-none-any.whl cd TensorRT-7.0.0.11/graphsurgeon sudo pip3 install graphsurgeon-0.4.1-py2.py3-none-any.whl