Ubuntu18安装NANO环境

Nano卡是Nvidia出的用于深度学习推理的芯片,可使用TensorRT加速;

1. 首次启动

Nano板的硬件、系统安装,参考官网教程即可,很详细;

地址:https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit

启动完成后,会配置Ubuntu18系统;配置完成后,用ifconfig查看ip,使用ssh远程登陆即可;

2. 更换国内源

2.1 更换apt-get为阿里源

1.备份系统自带源

  mv /etc/apt/sources.list /etc/apt/sources.list.bak

2.修改/etc/apt/sources.list文件

  vim /etc/apt/sources.list  

3. 添加如下内容

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties

deb http://archive.canonical.com/ubuntu xenial partner

deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

4. 更新apt-get

sudo apt-get update

2.2 更换pip为阿里源

vim ~/.pip/pip.conf

添加如下内容:

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com

3. 安装python开发环境

Nano官网提供的Developer Kit中,使用Ubuntu18系统,自带python3.6、Cuda10;

深度学习环境安装官方教程:https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

如果apt-get不能安装成功,尝试sudo apt-get update;

如果想使用阿里源,参考https://blog.csdn.net/lg5196/article/details/83096616

安装python基础依赖包:

sudo apt-get install zlib1g-dev
sudo apt-get install libbz2-dev
sudo apt-get install libsqlite3-dev
sudo apt-get install python3-dev libxml2-dev libffi-dev libssl-dev libxslt1-dev

安装Nano环境依赖包(参考官网):

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 setuptools testresources

4. 安装TensorFlow-NV

安装最新版本的TensorFlow-NV

sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu

安装Scipy:

安装Scipy之前先安装blas lapack gfortran;

sudo apt-get install libblas-dev liblapack-dev
sudo apt-get install gfortran
sudo apt-get install python3-scipy

安装keras:

注意:

1. 不要使用pip安装keras、scipy、pandas、matplotlib等包,会出现编译错误;可能跟平台有关吧;

sudo apt-get install python3-keras
sudo apt-get install python3-pandas
sudo apt-get install python3-matplotlib
sudo apt-get install python3-scikit-learn

2. NANO板的pytorch、caffe、mxnet等框架,需要使用Docker去NVIDIA云平台上pull服务,才可使用

发布了11 篇原创文章 · 获赞 3 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/xueqinmax/article/details/100104715