一、刷机步骤
刷机教程可以参考博客:https://blog.csdn.net/qq_45389690/article/details/112022138
Jetson jetpack下载地址:https://developer.nvidia.com/embedded/jetpack-archive,下载NVIDIA SDK Manager
进入刷机模式:
- 为TX2供电,并完成硬件连接
- 按下开机键(POWER BTN),按下后马上松开
- 长按恢复键(REC)
- 保持按住恢复键,按一下重置键(RST)
- 按完重置键后即可松开恢复键
- 按下并保持recovery键==》上电==》按下reset,松开reset==》约2s后松开recovery
- 在刷机的Ubuntu系统,输入输入
lsusb
,若显示nvidia crop
,即连接成功。 - 然后可以按刷机教程next了,注意:不要勾选download now.Install later
注意:这一步需要比较恶心:
1、这一步会通过ssh连接,写入系统信息,所以需要把设备开机;
2、连上USB后UBUNTU的ip会显示192.168.55.xxx网段,Jetson的IP为192.168.55.1
3、在Jetson 模块设置用户和密码,需要注意的是Jetson模块的名称只能小写
4、输入用户名和密码,点击INSTALL。注意:只要出现这一步,一定要确保Jetson是开机的
二、Tensorflow安装
1、如果不知道自己安装的jetpack的版本,可以安装:sudo pip3 install jetson-stats,然后输入:sudo jtop
2、Tensorflow安装
教程链接:https://forums.developer.nvidia.com/t/official-tensorflow-for-jetson-nano/71770
Python 3.6+JetPack4.5
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
sudo apt-get install python3-pip
sudo pip3 install -U pip testresources setuptools==49.6.0
sudo pip3 install -U numpy==1.16.1 future==0.18.2 mock==3.0.5 h5py==2.10.0 keras_preprocessing==1.1.1 keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11
# TF-2.x
$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v45 tensorflow
# TF-1.15
$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v45 ‘tensorflow<2’
Python 3.6+JetPack4.4
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
sudo apt-get install python3-pip
sudo pip3 install -U pip
sudo pip3 install -U pip testresources setuptools numpy==1.16.1 future==0.17.1 mock==3.0.5 h5py==2.9.0 keras_preprocessing==1.0.5 keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11
# TF-2.x
$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 tensorflow==2.3.1+nv20.12
# TF-1.15
$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 ‘tensorflow<2’
Python3.6+JetPack4.3
$ sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
$ sudo apt-get install python3-pip
$ sudo pip3 install -U pip
$ sudo pip3 install -U numpy grpcio absl-py py-cpuinfo psutil portpicker six mock requests gast h5py astor termcolor protobuf keras-applications keras-preprocessing wrapt google-pasta
# TF-2.x
$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow==2.1.0+nv20.3
# TF-1.15
$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compu
三、torch安装
下载地址:https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-9-0-now-available/72048
下载完成后直接安装即可。
执行torch是可能会报错:OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory
出现这个问题可能刷的torch版本有点高,可以重新刷一个低版本试试。
解决方案:参考博客https://blog.csdn.net/u013171226/article/details/107711831
1、登入 https://pkgs.org/网站,在右上角的搜索框中输入libmpi_cxx.so.20,然后下载libopenmpi2_2.1.1-8_arm64.deb。每个包的下载地址如下:
2、 libopenmpi2_2.1.1-8_arm64.deb安装:dpkg -i libopenmpi2_2.1.1-8_arm64.deb
3、安装过程会缺库:
根据缺的库进行apt-get 安装
3、torchvision安装
在地址:https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-9-0-now-available/72048