赞
踩
看了无数教程和b站视频,啊啊啊啊啊啊啊啊啊啊啊tensorRT要我狗命啊。我要写全网tensorRT最全的博客!!!
总体来说成功安装方式有两种,pip安装和tar.gz安装(其实官网安装方式居多,奈何没有sudu权限~)我在两台服务器上分别用连这个红安装了tensorRT8.6.1,
硬件:
ubuntu 20.04
cuda:11.0
查看指令:cat usr/local/cuda/version.txt
cat /etc/issue
参考:NVIDIA官方安装教程
安装指令:
进入anaconda环境,python3 -m pip install --upgrade tensorrt
(安装最新版)
测试:
python3
>>> import tensorrt
>>> print(tensorrt.__version__)
>>> assert tensorrt.Builder(tensorrt.Logger())
1.[08/31/2023-13:45:20] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING
in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
2.CUDA initialization failure with error: 35. Please check your CUDA installation:
解决方案:
pip uninstall tensorrt
pip install tensorrt==查看安装版本,一个一个试
(毕竟我也没办法升级显卡驱动等等~)
成功安装,如下:
参考官方安装教程:https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-tar
cd 1.softwares/TensorRT-8.6.1.6/samples/sampleOnnxMNIST
make
../../bin/sample_onnx_mnist
参考连接:
https://zhuanlan.zhihu.com/p/392143346
【Linux安装Tensorrt】 https://www.bilibili.com/video/BV1kB4y117NZ/?share_source=copy_web&vd_source=4e0c29ba5725db288c1234b3d73dcfce
https://blog.csdn.net/qq_42160143/article/details/129837613
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。