Jetson Nano Openbox

Main reference:

Official resources of Jetson Nano blog

Jetson-Openbox  

 

Step 1: Open box and install Pytorch for deep learning

  1. Changing the source of Jetson software source and update.
    sudo vim /etc/opt/source.list
    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
  2. Add path of CUDA
    sudo vim ~/.bashrc
    # cuda 10.2
    export PATH=/usr/local/cuda/bin$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda/lib64$LD_LIBRARY_PATH
    export CUDA_ROOT=/usr/local/cuda
    source ~/.bashrc
  3. Change Python version
    sudo echo alias python=python3 >> ~/.bashrc
    source ~/.bashrc
  4. Install pip3
    sudo apt-get install python3-pip
  5. Download Pytorch whl file (May need proxy)
  6. Install Cython -> numpy -> Pytroch using pip (Need Internet for type-extensions or other dependencies here), you may refer to appendix follow using Tsinghua source here.
  7. Install openmpi and other dependency: 
    sudo apt install openmpi-bin
    sudo apt install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev
    sudo apt install gfortran libopenblas-dev liblapack-dev libavfilter-dev
  8. When typing import torch in Python command line and there is no error, Congratulations for Pytorch!
  9. Install torch vision: Pay attention to Atomic bug 
    sudo git clone https://github.com/pytorch/vision.git
    cd vision
    python setup.py install

    When adding Atomic.cuh, my path is : /home/nvidia/.local/lib/python3.6/site-packages/torch/include/ATen/cuda, Other info may need

    Please firstly query the torchvision you need here: version check

Other information:

It is useful when pip install something:

pip3 install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple

My Jetpack information:

 - NVIDIA Jetson Nano (Developer Kit Version)
   * Jetpack 4.6.1 [L4T 32.7.1]
   * NV Power Mode: MAXN - Type: 0
   * jetson_stats.service: active
 - Libraries:
   * CUDA: 10.2.300
   * cuDNN: 8.2.1.32
   * TensorRT: 8.2.1.8
   * Visionworks: 1.6.0.501
   * OpenCV: 4.1.1 compiled CUDA: NO
   * VPI: ii libnvvpi1 1.2.3 arm64 NVIDIA Vision Programming Interface library
   * Vulkan: 1.2.70

 

posted @ 2022-06-20 22:26  Sanhao99  阅读(65)  评论(0编辑  收藏  举报