Nvidia Jetson - ashBabu/Utilities GitHub Wiki
Jetson Nano Orin Developer Kit
It requires a computer with Nvidia SDK Manager and a microSD card to be inserted in a slot under the fan of the Nano orin ( a bit difficult to find this slot and also to insert). Once SDK manager is installed in the host system,
- Connect the Nano to the host with USB-C cable
- At the time of writing this (13 July 2023), the supported version of Jetpack is 5.1.1 (rev. 1). (Unfortunately, this version does not support the librealsense installation as mentioned here. The
./scripts/patch-realsense-ubuntu-L4T.sh
return withUnsupported Jetpack
error.) - Check the option for Deepstream in the SDK Manager for neural network deployment.
- There's a window where the SDK manager asks for Automatic or Manual Setup. Go for Manual setup and connect a jumper to pin 9 and 10 to enforce force recovery mode. These pins are again under the fan.
- Connect the power supply (round pin) and a pop up comes up in the SDK Manager to select the device (Jetson Nano Orin 8 GB dev kit).
- Provide the username and password
- Remove the jumper
- Click flash and wait for it to finish
Jetson AGX Orin Developer kit
Instruction to set this up with jetpack are available here. In case, this fails, download Nvidia SDK Manager and follow the instructions. More info
To get the version of the jetpack installed, use sudo apt-cache show nvidia-jetpack
, for cuda version nvcc --version
Install Pytorch and torchvision
The requirements.txt
is available here.
For some reason, the conda install
of pytorch and torchvision installed cpu versions. In order to get the cuda versions, I had to manually install everything from source.
I had Nvidia Jetson Agx Orin Developer kit with jetpack 5.1 and L4T R35.2.1. So I downloaded Pytorch v2.0.0 (the one ending with .whl
). Then
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev
pip3 install Cython
pip3 install numpy torch-2.0.0+nv23.05-cp38-cp38m-linux_aarch64.whl
For torchvision
,
sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libopenblas-dev libavcodec-dev libavformat-dev libswscale-dev
git clone https://github.com/pytorch/vision torchvision
cd torchvision
git checkout release/0.15 # This is the version compatible with pytorch 2.0. Checkout the above link
export BUILD_VERSION=0.15 # where 0.x.0 is the torchvision version
python3 setup.py install --user
verification
import torch
print(torch.__version__)
print('CUDA available: ' + str(torch.cuda.is_available()))
print('cuDNN version: ' + str(torch.backends.cudnn.version()))
import torchvision
print(torchvision.__version__)
Install & remove ZED SDK on Jetson
From here. To remove ZED SDK sudo rm -R /usr/local/zed/
Install the driver for capture card
From here. Reboot the jetson.
Get started
cd /usr/local/zed/tools
./ZED_Explorer
to open the live streaming of the camera../ZED_Depth_Viewer
shows the depth image and so on. If the camera fails to open trysudo systemctl restart zed_x_daemon
Jetson Nano
General
- Jetson nano does not have built in wifi. So the best way to set up wifi would be to use an adaptor. One of the many possible solutions (but not all would work, for eg. TP link 2357:0105 Archer T1U which uses MT7610U) is to use Edimax EW-7611ULB (Edimax N150) wifi + Bluetooth adaptor.
Instructions for setting up Edimax EW-7611ULB
Setting up CSI camera
- Jetson nano can work with Raspberry Pi V2 Camera and NOT V1
- Instructions here
- JetsonHacks Github