Jet nano configuration and caffe installation under Xshell6

Keywords: sudo Makefile git github

Configuration and use of jet nano (6) caffe installation under Xshell6

Before installing caffe, we need to do some preparation work, and the whole process is relatively long. There may be various problems in the process, so we must carefully operate step by step. First, refer to the article between, use Xshell6 to connect the Jetson Nano, and then start with the following.

1. Modify the hosts file

Due to the local compilation and installation, the git clone command is used. Under normal circumstances, the speed is pitiful. In the absence of a ladder, I can only modify the hosts file to comfort me. Compared with the original, the speed is also improved a lot, leaving tears of excitement here. Cut the crap and do it!
(1) find the local hosts file and open it,

dnano@dnano-desktop:~$ sudo vi /etc/hosts

(2) add the following at the end of the file, and by the way, add ports.ubuntu.com,

 192.30.255.112 https://github.com
 192.30.255.113 https://github.com
 151.101.76.249 github.global.ssl.fastly.net
 91.189.88.151 ports.ubuntu.com
 91.189.88.150 ports.ubuntu.com

(3) restart the network to take effect,

dnano@dnano-desktop:~$ sudo /etc/init.d/networking restart

2. Installation dependency

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
 
sudo apt-get install --no-install-recommends libboost-all-dev
 
sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev
 
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
 
sudo apt-get install git cmake build-essential

3. Install caffe

(1) use git to clone the source code locally, depending on the network speed,

git clone https://github.com/BVLC/caffe.git

(2) generate Makefile.config according to the sample file Makefile.config.example provided by caffe,

cd caffe
sudo cp Makefile.config.example Makefile.config

(3) modify the Makefile.config file,

[1]Remove the comment symbols before the following, located at5Row,23Row,92That's ok;
5 USE_CUDNN := 1
23 OPENCV_VERSION := 3
9 WITH_PYTHON_LAYER := 1

[2]Will be the first39That's ok CUDA_ARCH Medium20,21Content removal;
 39 CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \
 40                 -gencode arch=compute_35,code=sm_35 \
 41                 -gencode arch=compute_50,code=sm_50 \
 42                 -gencode arch=compute_52,code=sm_52 \
 43                 -gencode arch=compute_60,code=sm_60 \
 44                 -gencode arch=compute_61,code=sm_61 \
 45                 -gencode arch=compute_61,code=compute_61

[3]take95,96Change the line to the following;
95 INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
96 LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/aarch64-linux-gnu /usr/lib/aarch64-linux-gnu/hdf5/serial

(4) modify the Makefile file,

Posted by sparc-e on Mon, 18 Nov 2019 08:22:27 -0800