Files
dora-zed/scripts/install_linux_arm.sh
T
cesarandClaude Opus 5 126dbf4f32 remove detection from the node
dora-zed publishes camera data only. The two engines under src/engines/, the
objects output, the ZED_ENGINE/ZED_DETECTION_*/ZED_ONNX_* variables and the
ZED_PC_MODE=ROI crop are gone, along with the standalone engine test and the
model export script.

This drops the unconditional ONNX Runtime requirement from CMakeLists, the
Dockerfile and the install scripts, so the node now configures on a machine
with no ONNX Runtime — which is what blocked the Jetson build, since there is
no official ARM64 GPU binary.

zed_native is dropped rather than kept: it is bound to the live camera handle
and cannot run in a node that receives images over a dataflow. The removed
code remains reachable at tag v0.1.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7g2cBJ5e3r15ZbJ9WZn8c
2026-09-08 09:12:40 -03:00

63 lines
2.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Install build dependencies for dora-zed on NVIDIA Jetson (ARM64 / L4T).
# Skips any component that is already installed.
# Uses aria2c for fast parallel downloads if available, otherwise falls back to wget.
#
# Supported JetPack versions for ZED SDK 5.x:
# JetPack 6.0 GA (L4T 36.3) — Jetson Orin
# JetPack 6.1/6.2 (L4T 36.4)
# JetPack 6.2.2 (L4T 36.5)
# JetPack 7.0 (L4T 38.2) — Jetson Thor
# JetPack 7.1 (L4T 38.4)
set -euo pipefail
ZED_VERSION="5.2"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TMP_DIR="${SCRIPT_DIR}/../tmp"
mkdir -p "$TMP_DIR"
download() {
local url="$1" dest="$2"
if command -v aria2c &>/dev/null; then
aria2c -x 16 -s 16 -d "$(dirname "$dest")" -o "$(basename "$dest")" "$url"
else
wget -O "$dest" "$url"
fi
}
# --- Detect L4T version ---
if [ ! -f /etc/nv_tegra_release ]; then
echo "Error: /etc/nv_tegra_release not found. Is this a Jetson device?" >&2
exit 1
fi
L4T_VERSION=$(head -1 /etc/nv_tegra_release | grep -oP 'R\K[0-9]+\.[0-9]+' | head -1)
L4T_MAJOR=$(echo "$L4T_VERSION" | cut -d'.' -f1)
echo ">>> Detected L4T ${L4T_VERSION} (major: ${L4T_MAJOR})"
case "$L4T_MAJOR" in
36) L4T_PATH="l4t36" ;;
38) L4T_PATH="l4t38" ;;
35) L4T_PATH="l4t35" ;;
*)
echo "Warning: L4T ${L4T_MAJOR} not tested. Attempting l4t${L4T_MAJOR}." >&2
L4T_PATH="l4t${L4T_MAJOR}"
;;
esac
# --- ZED SDK ---
if [ -d /usr/local/zed ]; then
echo ">>> ZED SDK already installed at /usr/local/zed — skipping."
else
echo ">>> Downloading ZED SDK ${ZED_VERSION} for Jetson (${L4T_PATH})..."
download \
"https://download.stereolabs.com/zedsdk/${ZED_VERSION}/${L4T_PATH}/jetsons" \
"${TMP_DIR}/ZED_SDK.run"
chmod +x "${TMP_DIR}/ZED_SDK.run"
echo ">>> Installing ZED SDK (silent)..."
sudo "${TMP_DIR}/ZED_SDK.run" -- silent skip_python skip_tools
fi
echo ">>> Done. You can now run: scripts/build.sh"
echo ">>> Downloaded files are in ${TMP_DIR}"