(1) Installing JTOP to check CPU usage
sudo apt-get update
sudo apt-get full-upgrade
sudo apt install curl
sudo apt install nano
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py
sudo pip3 install jetson-stats
jtop
(1)Jetson's OS image already comes with JetPack, cuda, cudnn, opencv, etc. It has been installed and has examples. The installation path for these examples is as follows
xTensorRT /usr/src/tensorrt/samples/
CUDA /usr/local/cuda-11.4/samples/
cuDNN /usr/src/cudnn_samples_v8/
VisionWorks /usr/share/visionworks/sources/samples/
/usr/share/visionworks-tracking/sources/samples/
/usr/share/visionworks-sfm/sources/samples/
OpenCV /usr/share/opencv4/samples/
(2) Check CUDA Version 11.4 of CUDA has already been installed in Jetson orin nx, but at this time, if you run nvcc - V, it will not succeed. You need to write the path of CUDA to the environment variable. The Vim tool comes with the OS, so run the following command to edit the environment variables
Firstly, check if there is nvcc in the bin directory of cuda:
xxxxxxxxxx
ls /usr/local/cuda/bin
IF EXISTS,
xxxxxxxxxx
sudo vim ~/.bashrc Enter the configuration file; Add the following two lines on the last side:
Note: In vim, use Esc to return to command mode, and switch to the input module through I to enter text in input mode
xxxxxxxxxx
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
Note: After exiting the command mode through Esc, press: to start inputting commands, wq to save and exit, q to exit, q! For forced exit
Save to exit.
Then it needs to take effect under the source.
xxxxxxxxxx
source ~/.bashrc
After the source, execute nvcc - V again at this time, and the result is as follows
beckhans@Jetson:~$ nvcc -V
(3)check OpenCV
Jetson already has OpenCV4.5.4 installed, you can use the command to check if OpenCV is installed properly
pkg-config opencv4 --modversion
If OpenCv is installed properly, the version number will be displayed, and my version is 4.5.4
(4)check cuDNN
CuDNN has been installed in Jetson nano and there are examples available for operation. Let's run the examples to verify the CUDA above