2020년 2월 7일 금요일

Jetson Nano - JetPack 4.3 SD image installation

In late 2019, Nvidia released Jetpack 4.3. In this post, I will install a Jetpack 4.3 SD card image into the Jetson Nano. It is highly recommended that you read the Release Note before installation. Basic image burning, initial setup process is same as before. See NVidia's https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#prepare page for initial setup. Please refer to my previous post.

First download the Jetpack 4.3 image for Jetson Nano here.

Power modes of Jetson Nano

The Jetson has two power profiles, called modes. Mode 0 is 10W, Mode 1 is 5W.
You can query the current mode(Default mode is 0):


$ sudo nvpmodel -q


To set it back to 10 Watt mode:


$ sudo nvpmodel -m 0


Remove unnecessary programs


Remove Docker

If you don't use a docker container, remove it. Docker daemons use dome system resources.

update(2020. 04) :  remove docker-engine

apt-get remove docker docker-engine docker.io containerd runc

apt-get remove docker docker.io containerd runc


Delete LibreOffice

I don't think you need LibreOffice on the JetsonNano.
Removing the LibreOffice will make more storage space.


apt-get remove --purge libreoffice*
apt clean
apt-get autoremove


Increase swap memory

When you build a large software packages , you may experience an out of memory phenomenon. Increasing the swap file size can prevent this malfunction.


git clone https://github.com/JetsonHacksNano/installSwapfile
cd installSwapfile
./installSwapfile.sh

Above script file will increase 6GB swap files. You can change the swap file size by modifying the scripts. If you want to uninstall the swap setting, open the fstab file and delete the swap file line and reboot.



sudo vi /etc/fstab

There's a good explanation on this site.
https://www.jetsonhacks.com/2019/04/14/jetson-nano-use-more-memory/
Be careful : Even though you increase the swap file size, cuda actually use physical memory only. So deep learning frameworks those use cuda may not get benefits.


Install packages

First, install packages including numpy, pip3. I always use python3, so installation of the python2 package is omitted from the description.


apt-get update
apt-get install -y python3-pip python3-dev
#numpy install 
pip3 install cython
pip3 install numpy
apt-get install -y libcanberra-gtk* 

Now check the OpenCV.


root@spypiggy-nano:~# python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.1.1'

Wow, new JetPack 4.3 comes with OpenCV 4.1.1.
I recommend that you use the version provided by JetPack 4.3 without installing OpenCV 4.X separately.

More memory?

If you want to increase the amount of available memory, you may want to consider replacing your desktop with LXDE. Please see my previous post for more information.


Wrapping up

The following are the new features introduced in the Release Notes.

  • Support for installation of JetPack components via Debian package archives.
    JetPack components are provided as Debian packages via a public APT server hosted by NVIDIA. Enables easier installation of JetPack components and upgrading to future versions.
  • Includes TensorRT 6.0.1
  • Includes cuDNN 7.6.3
  • Support for CSI and Encode from within containers
  • Includes OpenCV 4.1.1
  • Developer preview of VPI (Vision Programming Interface)
    VPI is a software library that provides Computer Vision / Image Processing algorithms implemented on PVA1 (Programmable Vision Accelerator), GPU2 and CPU2.
  • Supports DeepStream 4.0.2
  • Supports ISAAC SDK version 2019.3










댓글 없음:

댓글 쓰기