• Deploy with NVIDIA's Jetson
  • Installing DepthAI on Jetson
  • apt update/upgrade
  • SWAP size
  • Dependencies
  • venv
  • DepthAI repo
  • .bashrc
  • Powering OAK from Jetson
  • Interface Options

Deploy with NVIDIA's Jetson

Connecting OAK devices to NVIDIA Jetson SBCs unleashes powerful edge AI capabilities. To install the DepthAI library on a Jetson device, follow the steps to install dependencies and the library itself through pip. DepthAI provides prebuilt wheels for Jetson on PyPi.

Installing DepthAI on Jetson

To install DepthAI on Jetson Nano or Jetson Xavier, perform the following steps, after completing a fresh install and setup. On the first log in, do not immediately run updates.This first step is optional: go to the Software (App Store) and delete the apps or software that you probably will not use.

apt update/upgrade

Open a terminal window and run the following commands:
Command Line
1sudo apt update && sudo apt upgrade
2sudo reboot now

SWAP size

Change the size of your SWAP. These instructions come from the Getting Started with AI on Jetson from Nvidia:
Command Line
1# Disable ZRAM:
2sudo systemctl disable nvzramconfig
3# Create 4GB swap file
4sudo fallocate -l 4G /mnt/4GB.swap
5sudo chmod 600 /mnt/4GB.swap
6sudo mkswap /mnt/4GB.swap
If you have an issue with the final command, you can try the following:
Command Line
1sudo vi /etc/fstab
2# Add this line at the bottom of the file
3/mnt/4GB.swap swap swap defaults 0 0
4# Reboot
5sudo reboot now


Install depthai dependencies
Command Line
1sudo wget -qO- https://docs.luxonis.com/install_dependencies.sh | bash


Create a python virtual environment
Command Line
1sudo apt install python3-venv
2python3 -m venv depthai
3source depthai/bin/activate

DepthAI repo

Clone the DepthAI repository and install the library
Command Line
1#Clone github repository
2git clone https://github.com/luxonis/depthai-python.git
3cd depthai-python
4python3 examples/install_requirements.py


Last step is to edit .bashrc with the line:
Command Line
1echo "export OPENBLAS_CORETYPE=ARMV8" >> ~/.bashrc
This should take care of all the dependencies and install the DepthAI library. You can now run the examples and use the DepthAI library on your Jetson device.

Powering OAK from Jetson

Jetson devices can generally provide sufficient power to OAK cameras directly via USB, thanks to their robust power supply systems. However, if you encounter stability issues or plan to connect multiple USB devices, consider using an externally powered USB hub or powering the OAK device through the Y-Adapter.

Interface Options

If you're working headlessly with the Jetson, you can SSH into it similarly to the Raspberry Pi. Ensure that SSH is enabled (it is by default on most Jetson images):
Command Line
1ssh username@jetson_ip_address
Replace username with your Jetson's username (default is usually jetson or nvidia) and jetson_ip_address with the device's IP address.If you're using a Jetson with a graphical interface, you can use X11 forwarding to display GUI elements on your local machine. To do this, use the -X flag when SSHing into the Jetson:
Command Line
1ssh username@jetson_ip_address -X
Alternatively, you can use VNC to access the Jetson's graphical interface remotely. To enable VNC, go to Settings > Sharing > Screen Sharing and enable the service. Then, use a VNC client to connect to the Jetson's IP address.