# Jetson Xavier NX ###### tags: `Single board computer` `Jetson Xavier NX` [TOC] ## Introduction  **Jetson Xavier NX** is a powerful single board for deep learning. ### Jetpack **NVIDIA JetPack SDK** is the most comprehensive solution for building AI applications. All Jetson modules and developer kits are supported by JetPack SDK. * [Jetpack SDK](https://developer.nvidia.com/embedded/jetpack) ## Setup This video introduce Jetson Xavier NX and first boot for beginners by Paul McWhorter. {%youtube LuWYXKrQcJ8 %} ### Flash the SD card Download the tools for setting up the boot SD card. **1. Formatter is to format the SD card.** * [SD card formatter](https://www.sdcard.org/downloads/formatter/) **2. The balenaEtckher is a tool to install the Operating System (OS) to the SD card.** * [balenaEtcher](https://www.balena.io/etcher/) **3. Download the SD card Image** > After download don't need to unzip the file. * [Jetson Xavier NX Image](https://developer.nvidia.com/embedded/jetpack) ### Jetson stats > It allows you to performance your CPU or GPU etc. . **1. Install pip toolkit for python3** ``` sudo apt-get install python3-pip ``` **2. Install Jetson stats** ```command sudo -H pip3 install -U jetson-stats ``` **3. Run Jetson stats** ``` sudo systemctl restart jetson_stats.service ``` ```command sudo jtop ``` `Ctrl +C` to quit. ### Change the CPU Mode :hammer: The initial mode is 10W for two CPUs operating. You can switch to 15W mode and six CPUs will start to run. ### Check camera * Webcam. ```command cheese ``` * Raspi camera ```command gst-lauch-1.0 nvarguscamerasrc ! nvoverlaysink ``` `Ctrl +C` to quit the camera. ### 風扇轉動 ```command sudo sh -c 'echo 140 > /sys/devices/pwm-fan/target_pwm' ``` 140 為PWM參數,區間為0~255,0代表完全停止,255代表風扇最強。 ## CUDA 環境變量配置 使用Vim來進行環境變量寫入操作。 ```command sudo vim ~/.bashrc ``` 打開環境變量文件後按下`a`控制Vim進行插入刪改操作模式,然後在文件的最後插入以下 ``` export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export CUDA_HOME=$CUDA_HOME:/usr/local/cuda export OPENBLAS_CORETYPE=ARMV8 ``` 按`ESC`退出編輯插入模式,輸入`:wq`強制退出Vim。 刷新環境變量 ```command source ~/.bashrc ``` 通過查看nvcc版本的指令來查看是否配置好CUDA相關環境變量 ```command nvcc -V ``` :::info Jetson Xavier NX,Jetpack4.6,CUDA 10.2,CUDNN 8.0. ::: ## Change power mode ```bash= sudo nvpmodel -m 0 #15W 2core mode for Xavier NX. ``` ## Jetson_clocks * Type the script below before control the jetson_clock. ```shell sudo jetson_clocks --store ``` * Start running ```shell sudo jetson_clocks ``` * Inactive ``` sudo jetson_clocks --restore ``` ## Add More Shared Memory * Check the shared memory. ``` df -h ``` * change the permission of all files in /etc . ``` sudo chmod 777 /etc/fstab ``` * Edit fstab file. ``` vi /etc/fstab ``` * Insert below script to end of file. ``` tmpfs /dev/shm tmpfs defaults,size=8G 0 0 ``` * Mount /dev/shm ``` sudo mount -o remount /dev/shm ``` ## Install Pytorch & torchvision * [Install Pytorch and torchvision](https://hackmd.io/@willy541222/jetson_xavier_nx_pytorch) ## Remote Control * [Setup VNC](https://hackmd.io/@willy541222/jetson_xavier_nx_vnc) * [ngrok-SSH](https://hackmd.io/@willy541222/Nvidia_Xavier_NX_ngrok) ## Object Detection * [Yolo](https://hackmd.io/@willy541222/jetson_xavier_nx_yolo) * [SSD](https://hackmd.io/@willy541222/Nvidia_Xavier_NX_ngrok) ## Visual Studio Code * [Install & Setup VScode](https://hackmd.io/@willy541222/jetson_xavier_nx_vscode) ## USB exfat ``` sudo apt update && sudo apt install exfat-fuse exfat-utils ``` ## Opencv * [Opencv install with CUDA](https://hackmd.io/@willy541222/opencv_Jetson_Xavier_NX) ## Wifi turn on/off * Turn off ```bash sudo nmcli radio wifi off ``` * Turn ON ```bash sudo nmcli radio wifi on ``` ## Issue * Unable to locate package python3-pip3 ```bash sudo apt-get update ``` ## Reference * [SD card formatter](https://www.sdcard.org/downloads/formatter/) * [balenaEtcher](https://www.balena.io/etcher/) * [Jetson Xavier NX](https://www.nvidia.com/zh-tw/autonomous-machines/embedded-systems/jetson-xavier-nx/) * [Getting Start with Jetson Xavier NX Developer Kit](https://developer.nvidia.com/embedded/learn/get-started-jetson-xavier-nx-devkit#intro) * [Jetson Download Center](https://developer.nvidia.com/embedded/downloads#?tx=$product,jetson_xavier_nx) * [NVIDIA Developer](https://developer.nvidia.com/) * [Jetpack SDK](https://developer.nvidia.com/embedded/jetpack) * [NVDIA Developer Blog](https://developer.nvidia.com/blog/) * [NVIDIA NGC](https://ngc.nvidia.com/catalog/collections) * [NVIDIA Transfer Learning Toolkit](https://developer.nvidia.com/transfer-learning-toolkit) * [Jetson Install Pytorch & torchvision](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-7-0-now-available/72048) * [Jetson_inference](https://github.com/dusty-nv/jetson-inference) <i class="fa fa-github" aria-hidden="true"></i> * [Jetson_benchmarks](https://github.com/NVIDIA-AI-IOT/jetson_benchmarks) <i class="fa fa-github" aria-hidden="true"></i>
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up