jetson nano 初始化和安装tensorflow

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_43780211/article/details/97146332

jetson nano 初始化教程

基础教程(烧写镜像)

(网上很多这种教程,不做过多叙述)
1.从英伟达官网下载SD卡镜像(5.25GB):下载jetson-nano-sd-r32.1-2019-03-18.zip文件,解压后得到jetson-nano-sd-r32.1-2019-03-18.img文件。
2.下载烧写器:Nvidia官方推荐使用Etcher将下载的img文件写入TF卡,Etcher支持Mac,Linux,Win三个平台。我这里使用最简单的方法,下载win x64版
3.将镜像(需先解压得到.img文件)写入TF卡
4.双击直接运行 balenaEtcher-Portable-1.5.24-x64.exe,分别如下:选择jetson-nano-sd-r32.1-2019- 03-18.img镜像文件、选择自己的TF卡;然后开始flash
5.将sd卡插入jetson nano,启动

换源,安装基础包

1.更换apt源(我这里换的是清华大学的源,中科大的一些源我有些东西下载不了)

sudo gedit /etc/apt/sources.list

2.将以下的文件覆盖原来的文件并保存

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

3.更新

sudo apt-get update
sudo apt-get upgrade

4.安装tensorflow
(按照的官网的教程:https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html)

安装一些基础包
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
安装更新pip3
sudo apt-get install python3-pip
sudo pip3 install -U pip
安装numpy等一些包
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
安装tensorflow
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu

5.补充
(建议将pip也换成国内的)
第一步:

cd ~
mkdir .pip
sudo gedit .pip/pip.conf

第二步:将下面的文件复制进去(用的阿里的)

[global]

trusted-host = mirrors.aliyun.com
index-url = http://mirrors.aliyun.com/pypi/simple

展开阅读全文

没有更多推荐了,返回首页