买来的NVIDIA NX自带了一个sd卡和一个ssd卡,刚开始按照sdkmanager去安装系统,结果安装后发现装到了sd卡上,后又根据视频教程在ssd上安装了系统,最后配置了深度学习的环境,搭载了realsense进行检测分割
1.sdkmanager应用
(1)首先下载安装sdkmanager软件,可以去nvidia官网下载,也可以下载我上传的百度云https://pan.baidu.com/s/1QdMJGXc3KX7uU9lrYARVJw(密码:8633),解压后切换到sdk文件夹中
sudo apt install ./sdkmanager_1.6.0-8170_amd64.deb
(2)安装
用跳线把NX第二个和第三个引脚相连,进入recovery模式,选择以上三个选项进行安装
勾选同意协议,将系统以及cuda和cudnn等包下载,下载后自动安装,注意,尽量安装cuda和cudnn,不然安装系统后需要重新下载,arm架构的cuda和cudnn官网下不了
(3)卸载跳线,进入NX系统设置即可
2.SSD安装系统
上面鼓捣半天结果装载在了sd卡上,后面很难进行深度学习开发,故需安装在ssd上
(1)将主机和NX用usb相连,github下载程序https://github.com/jetsonhacks/bootFromExternalStorage
解压并切换到该文件夹
在主机中依次执行
./install_dependencies.sh
./get_jetson_files.sh
安装跳线接在第二第三位
./flash_jetson_external_storage.sh./flash_jetson_external_storage.sh
当提醒摘除跳线时再摘除
上述过程中,需保持NX处于通电状态,但不可进入Ubuntu桌面,不然会提示没有设备连接
(2)NX重启,进入桌面
换源,写入source
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo gedit /etc/apt/sources.list
再删除source中所有内容,换清华源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
更新升级
sudo apt update
sudo apt upgrade
下载https://github.com/jetsonhacks/bootFromExternalStorage,自动安装cuda、cudnn等包
./install_jetson_default_packages.sh
(3)将cuda写入环境变量中,以使用nvcc -V
sudo gedit ~/.bashrc
在bashrc中最后添加两行
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
保存,并刷新
source ~/.bashrc
(4)安装pip3
sudo apt install python3-pip python3-dev
python3 -m pip install --upgrade pip #升级pip
(5)安装cuda、cudnn等包
下载https://github.com/jetsonhacks/bootFromExternalStorage,并切换到该文件夹
./install_jetson_default_packages.sh
重启NX
(6)重启后摘除NX与主机的USB连接线,我也不知道为什么,有一次没摘,并且把主机中的缓存文件缓存删掉了,结果SSD上的系统就没了,又重装了一次
3.安装pyrealsense2
(1)引用:JetsonNX编译librealsense,解决ERROR: Could not find a version that satisfies the requirement pyrealsense2_Xavier的博客-CSDN博客目前还没有arm架构下的pyralsense2的PyPi包,因此在jetson使用pip安装的话,无法找到满足的版本。在python3下`import pyrealsense2`显示ImportError: No module named pyrealsense2https://blog.csdn.net/weixin_39298885/article/details/113149462?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164067079216780265451935%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=164067079216780265451935&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-113149462.pc_search_mgc_flag&utm_term=jetson+nx%E7%BC%96%E8%AF%91librealsense&spm=1018.2226.3001.4187
I have written a set of instructions to install librealsense and pyrealsense2 on the Jetson NX · Issue #7722 · IntelRealSense/librealsense · GitHub
https://github.com/IntelRealSense/librealsense/issues/6964
(2)过程JetsonNX编译librealsense,解决ERROR: Could not find a version that satisfies the requirement pyrealsense2_Xavier的博客-CSDN博客
按该文章做法做完之后,虽然能调用realsense viewer,但是依旧不能导入pyrealsense2,需要讲一些.so文件复制到项目根目录中,参考Installing pyrealsense2 on MacOS? · Issue #5275 · IntelRealSense/librealsense · GitHub
完美运行