TX2 zed 卸载安装CUDA

1.显示CUDA_ERROR_INVAL_ID_CONTEXT,或者被Killed.

原因:显存不足

查看日志

dmesg | egrep -i -B100 ‘killed process’

解决方法:清除缓存,释放显存

sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"

2. zed摄像头打开失败,偶尔会成功

原因:未知

猜测可能是ZED版本问题

解决办法:重新安装ZED的SDK(平台是Jestson TX2, CUDA为9.0)ZED SDK 2.8,结果还是不行。

继续查看ZED官网,发现新版改进介绍有如下图

于是想着装上新版应该就能解决这个随机出现打不开的问题。但是新版只支持cuda10,而我的这个TX2装的是cuda9.0.

 

2.1 卸载cuda9.0

一次性卸载

sudo apt-get remove cuda*

安装cuda10, 安装出错了,查了下是驱动版本不支持

 

我这个TX2不支持CUDA10.0,无奈又得装回cuda9.0

3. TX2安装CUDA9.0

先安装CUDA

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/cuda-repo-l4t-9-0-local_9.0.252-1_arm64.deb


sudo dpkg -i cuda-repo-l4t-9-0-local_9.0.252-1_arm64.deb 

sudo apt-get install cuda-toolkit-9-0

再装cudnn, 我这里是已经有了,之前没卸载cudnn

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/libcudnn7_7.1.5.14-1+cuda9.0_arm64.deb

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/libcudnn7-dev_7.1.5.14-1+cuda9.0_arm64.deb

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/libcudnn7-doc_7.1.5.14-1+cuda9.0_arm64.deb


sudo dpkg -i libcudnn7_7.1.5.14-1+cuda9.0_arm64.deb

sudo dpkg -i libcudnn7-dev_7.1.5.14-1+cuda9.0_arm64.deb

sudo dpkg -i libcudnn7-doc_7.1.5.14-1+cuda9.0_arm64.deb

安装nvinfer

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/libnvinfer4_4.1.3-1+cuda9.0_arm64.deb

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/libnvinfer-dev_4.1.3-1+cuda9.0_arm64.deb

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/libnvinfer-samples_4.1.3-1+cuda9.0_arm64.deb


sudo dpkg -i libnvinfer4_4.1.3-1+cuda9.0_arm64.deb

sudo dpkg -i libnvinfer-dev_4.1.3-1+cuda9.0_arm64.deb

sudo dpkg -i libnvinfer-samples_4.1.3-1+cuda9.0_arm64.deb 

安装libgie

下载包https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-3.3.2/JETPACK_332_b3/libgie-dev_4.1.3-1+cuda9.0_arm64.deb

sudo dpkg -i libgie-dev_4.1.3-1+cuda9.0_arm64.deb

3..1 配置环境变量

修改cuda的环境变量(没有gedit可以用vim)

sudo gedit ~/.bashrc

打开后,拉倒最下面

写入


export CUBA_HOME=/usr/local/cuda-9.0

export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH

export PATH=/usr/local/cuda-9.0/bin:/usr/local/bin/cmake:$PATH

保存退出,更新环境变量

source ~/.bashrc

3.2 测试

nvcc -V

安装cuda9.0完毕。

 

重新测试了下几遍打开摄像头,能成功打开。

参考博客:

https://blog.csdn.net/ourkix/article/details/103902519

 

TX2手动安装cuda10.0https://blog.csdn.net/Zhaoxi_Li/article/details/100803353

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值