Files
Jetson/scripts/install_deps.sh
T
AngePierreandClaude Opus 5 c167c836e6 Portable Ithaca capture node: one install for every Jetson
Extract the install that was applied by hand to the Jetson Nano into a single
checkout that builds itself for whatever Jetson it lands on.

The two nodes on the rig share no JetPack — tegra210 caps at 4, tegra234 needs
5+ — so nothing binary is portable between them. The source and the procedure
are: install.sh detects the platform (L4T / JetPack / SoC), installs deps,
builds the OrbbecSDK and the preview server from source locally, and generates
a per-user config and systemd unit. The tested bridge.py ships verbatim; all
machine-specific paths live in the generated config, so it stays unmodified —
its one hardcoded path is made home-relative.

The retired GStreamer/RTSP target is dropped: the direct route encodes no video.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-10 15:57:15 +02:00

33 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Installs the build- and run-time packages the node needs. Idempotent: apt is a
# no-op for what is already there.
#
# The set is the same across Jetson generations — only the distro release behind
# it changes (18.04 -> 22.04), and apt resolves the right versions itself. No
# GStreamer: the direct preview route encodes no video.
set -euo pipefail
here=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
eval "$("$here/detect_platform.sh")"
echo ">> Dependances pour JetPack ${JETPACK} (L4T ${L4T}, ${SOC})"
# python3 is present on every JetPack image; websockets is the only bridge dep and
# is pure Python, so it works identically everywhere. Prefer apt's package, fall
# back to pip when the distro is too old to carry it.
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
build-essential cmake pkg-config \
libusb-1.0-0-dev libudev-dev liblz4-dev libjpeg-turbo8-dev \
python3 python3-pip
if ! python3 -c 'import websockets' 2>/dev/null; then
echo ">> websockets absent — installation via pip"
# 8.1 is what the Nano runs and what bridge.py was written against; anything
# >=8 keeps the same asyncio API surface the bridge uses.
python3 -m pip install --user "websockets>=8,<13" || \
sudo apt-get install -y python3-websockets
fi
echo ">> Dependances OK"