In order to fully utilize the process power for computer vision and machine learning on Jetson, Nvidia provided Jetpack toolkit, which include Operating System image and Components (MutimediaAPI, cuDNN, etc). However, Jetpack only allow installation through a host machine running Ubuntu 16.04. Furthermore, starting from Jetpack 4.2, the process is carry through with NVIDIA's Jetson SDK Manager.
This is a guide to setup Nvidia Jetson TX2 through a virtual machine, which in theory should work for both MacOSX, Windows and non-Ubuntu system (although the VM setup might be different). So far the guide has been tested with:
- Mac OSX Mojave 10.15.0
- A Laptop (or Desktop) with Internet connection and at least 2 USB hub
- Virtual Box 6.0
- Virtual Box Extension Pack for version 6.0: this is used to allow VM to get access to USB Ports
- Ubuntu 16.04 Desktop Image
- Nvidia board
- Micro USB to USB cable
- Montior with HDMI to NVIDIA Board
- Keyboard & mouse
- Setup a new Linux Ubuntu VM using Virtual Box 6.0 with the following requirements:
- >2048 MB of RAM
- >50 GB of Storage
- Under setting, configure VM with the following configuration:
- Display: 64 MB of Video memory, 1 monitor
- Network: Bridged Adapter with
name
attached through your Internet Connection driver - Ports: Under
USB
tab, chooseenable USB Controller
withUSB 3.0 (xHCI) Controller
- Once finished, Start VM, load Ubuntu Desktop Image and Install Ubuntu with minimal setting (it is recommended to configure screen resolution to be at least
1280x1080
) - Once Ubuntu is installed, go to Nvidia Jetpack Download Center and download the
SDK Manager
for your machine
The Installation process will be separate into two different part: Flashing Jetson OS and Installing Components. They must be done separately in order to ensure success.
- Put the Jetson Board into force USB recovery mode
1. Power down the device. If connected, remove the AC adapter from the device. The device must be powered OFF, and not in a suspend or sleep state.
2. Connect the Micro-B plug on the USB cable to the Recovery (USB Micro-B) Port on the device and the other end to an available USB port on the host PC.
3. Connect the power adapter to the device.
4. With the system powered on:
• Press and hold the RECOVERY FORCE button.
• While depressing the RECOVERY FORCE button, press and release the RESET button.
• Wait 2 seconds and release the RECOVERY FORCE button.
- Once the board is connect with the PC, on the Virtual machine, go to
Machine --> Settings --> Ports
, underUSB
tab, addNVIDIA Corp. APX
in to device filter - Make sure the VM machine recognize the Jetson Board through USB port
- Open
SDK Manager
, login with your NVIDIA developer account - Going through each step along with the instruction for each step as below
- Step 1: choose your board, ensure you have check mark on all field
- Step 2: choose everything under only
host machine
andflash OS
section (we will installcomponents
later). Agree toTerms and condition
, continue and enter your Ubuntu'ssudo
password when prompted
- Wait for the instllation to complete. Once finished, you should see
Ubuntu Configuration Wizard
on the Jetson machine. ChooseFinish and exit
on the host Ubuntu'sSDK manager
- Setup the
Wizard
, giving asudo
username and password for your Jetson OS. The OS flashing is now complete
- Login to Jetson OS and connect Jetson Board to Host machine with the VM
- Shutdown the VM, go to its
Setting
:- In
Network
, enable another adapter attached toBridge Adapter
with name...Nvidia Tegra
- In
Ports
, underUSB
tab, addNVIDIA Linux for Tegra
to device filter
- In
- Relaunch the VM, make sure it can see the Jetson Board through USB port (there should be a mounted filesystem)
- open
SDK Manager
, login with your NVIDIA developer account - Going through each step along with the instruction for each step as below
- Step 1: choose your board, ensure you have check mark on all field
- Step 2: choose everything under only
host machine
andSDK components
section. Agree toTerms and condition
, continue, enter your Ubuntu'ssudo
password when prompted, and enter your Jetson Boardsudo
username and password when prompted.
- Wait for installation to complete. You should now have all SDK components
- Note: if you run into error while installing components, this might be some dependencies error on Jetson OS. you can fix this by fix broken installs, update and upgrade dependencies on you Jetson OS and rerun
SDK manager
process
$ sudo apt-get install --fix-broken $ sudo apt-get update && sudo apt-get upgrade $ sudo apt-get autoremove
- Note: if you run into error while installing components, this might be some dependencies error on Jetson OS. you can fix this by fix broken installs, update and upgrade dependencies on you Jetson OS and rerun
In order to verify SDK components, open a new terminal on Jetson OS and try
nvcc --version
this should return current version of CUDA compiler driver
~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
...
Cuda compilation tools, release 10.0, V10.0.166
~$
These components can be installed directly on Jetson OS
- you would need gstreamer library from
linux-for-tegra
undernv_tegra/nv_sample_app/nvgstapps.tbz2
(a version will be attached with this repo) - Follow the instruction here: https://jkjung-avt.github.io/opencv3-on-tx2/