Repository navigation
sensing: deploy the camera producer to an Orin with one script - #1440
Closed
gareth-morgan-nv wants to merge 16 commits into
Closed
gareth-morgan-nv wants to merge 16 commits into
gareth-morgan-nv wants to merge 16 commits into
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
gareth-morgan-nv
had a problem deploying
to
dev
November 5, 2026 23:43 — with
GitHub Actions
Failure
gareth-morgan-nv
had a problem deploying
to
dev
November 6, 2026 00:35 — with
GitHub Actions
Failure
gareth-morgan-nv
force-pushed
the
gmorgan/TimestampAlignment
branch
from
November 6, 2026 01:42
ba2d1d7 to
b7d8f99
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 6, 2026 01:42
71ba28f to
c01441d
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/TimestampAlignment
branch
from
November 6, 2026 05:39
b7d8f99 to
be24085
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 6, 2026 05:39
c01441d to
90e796a
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/TimestampAlignment
branch
from
November 6, 2026 05:42
be24085 to
fbdc7e3
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
2 times, most recently
from
November 6, 2026 05:44
74a9341 to
214dfd6
Compare
gareth-morgan-nv
changed the base branch from
gmorgan/TimestampAlignment
to
gmorgan/FastLiveKit
November 6, 2026 05:44
gareth-morgan-nv
force-pushed
the
gmorgan/FastLiveKit
branch
from
November 6, 2026 18:04
a35d41d to
99c2446
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 6, 2026 18:04
ff992be to
c21b0c5
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/FastLiveKit
branch
from
November 6, 2026 20:31
99c2446 to
e7c9571
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 6, 2026 20:31
c21b0c5 to
3abc2c6
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 6, 2026 22:37
3abc2c6 to
90af995
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/FastLiveKit
branch
from
November 6, 2026 22:37
e7c9571 to
67c409f
Compare
6 of 9 tasks
gareth-morgan-nv
force-pushed
the
gmorgan/FastLiveKit
branch
from
November 9, 2026 18:51
67c409f to
d45ac3f
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 9, 2026 18:51
cb4ddf4 to
0abaff2
Compare
gareth-morgan-nv
changed the base branch from
gmorgan/FastLiveKit
to
gmorgan/SensingLiveKit
November 10, 2026 02:15
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 10, 2026 02:17
41808f3 to
af6d745
Compare
scripts/deploy_orin.py copies a snapshot of the tracked files to the Orin, builds only the producer there, packages the producer install component with checksums, and installs it as a versioned release run by one systemd service. It checks the ssh connection first, takes the password from ORIN_PASSWORD and the user from ORIN_USER, refuses to replace an unmanaged producer unless told to, and waits for the producer's own join and publish log lines before reporting ready. A failed build or transfer leaves the running producer alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…e build PATH The deploy compares per-file hashes of the tracked source, grouped into files that change often and files that rarely do, with the Orin's record and uploads only the difference, keeping one source directory so the persistent build stays incremental. The helper script is uploaded fresh and preflight runs before any source transfer. The build PATH now includes ~/.local/bin and /usr/local/cuda/bin, and preflight requires uv, which the build's Python setup needs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…t directory FetchContent publishes <lowercased name>_SOURCE_DIR, so the uppercase LICENSE and NOTICE lookups were empty and the install step looked for //LICENSE. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
… Orin --source DIR deploys a different git checkout (a worktree, say) and --branch NAME deploys that branch's committed files from it, exported with git archive so the working tree is ignored. The default is unchanged: the script's own checkout, local edits included. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…anch Drop --backend and the SENSING_WITH_* flags: which capture SDK is built is the deployed source's own CMake decision, so the same script deploys any branch. Add a repeatable --cmake-arg for options only some trees define, and pass -DSIPL_API_DIR only when that header tree exists. Remove the camera-backend flag from the README example and fix a stale script name in a comment. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…ploy options The release is assembled from the build (binary, platform configs, the LiveKit libraries the binary resolves, LiveKit licence files) instead of the source's install rules, so any branch deploys. The service puts the release directory first on LD_LIBRARY_PATH. Remove --prefix, --service-groups, --ready-timeout and --fetch-archive; their values are constants. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…eal failure report The LiveKit settings are optional (both or neither). Readiness requires every configured sensor to be producing (frames without LiveKit, published with it). When the producer does not become ready the script prints the service state, the producer's fault lines and the log with the driver's debug lines removed, and saves the complete log on the Orin. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…comparison The config names its mode (direct or livekit). Readiness is each configured sensor's latest status line since the producer's last start: frames captured and, for a stream with a direct destination, that link connected. Progress left over from an earlier attempt no longer counts. The file-grouping layer is removed: one comparison of per-file hashes decides what to upload. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
The producer ends its own process when a camera session will not stop, and relies on the service to start it again. Restart on failure after five seconds; a clean stop does not restart, and a start limit keeps a producer that cannot start from restarting forever. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
StartLimitIntervalSec and StartLimitBurst are unit settings; in [Service] systemd ignores them. Move them, and make the unit test section-aware (plus a systemd-analyze verify check, which on its own does not flag a misplaced key). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
orin_setup.sh installs what the producer build needs (toolchain, patchelf, JetPack packages, uv, the SIPL headers from the L4T archive), runs setup.sh for the SENSING drivers and overlay, then checks the cameras. setup.sh -y now selects the device-tree overlay through Jetson-IO's command line instead of its menu and schedules a reboot (exit 3). It does so whenever the deserializer's I2C bus is absent, and not again after a reboot that did not bring the bus up. orin_setup.sh --scan tries each of the carrier's 8 camera inputs alone. --detect DIR does the same, writes a platform config with the cameras it found, prints the link masks as JSON, and saves the inputs in known-cameras.json so the next run probes only those; all 8 inputs are scanned again when the file is missing or a saved camera does not answer. --sudo-password-stdin answers every sudo from a private tmpfs file so nothing prompts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…itself A deploy now checks the Orin and, when something is missing, installs it through orin_setup.sh: packages, SIPL headers (the newest SDK Manager download, or --sipl-api), the SENSING drivers and overlay. It waits out the reboot the overlay needs and continues. With ORIN_PASSWORD set the Orin's sudo is answered from stdin and nothing prompts. "cameras": "auto" in the config finds the cameras on any of the carrier's 8 inputs, builds the producer's platform config and link masks for them, and keeps only the streams for sensors that were found. The inputs found are saved on the Orin and tried first next time; --rescan-cameras scans all 8. New options: --install-prereqs, --check-camera, --scan-cameras, --logs, --no-setup, --sipl-api. Step 5 shows progress for file verification and for the wait for the cameras. The failure report hides the camera driver's own log lines, names a camera link that did not lock, and lists the real driver errors. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
A LiveKit-mode deploy needed the join token to already exist on the Orin, which meant a manual copy first. Add an optional "token_source" config key, a local file (relative to the config), that the deploy uploads to "token_file" before anything is built or stopped. It goes by scp into a staging file created with mode 0600 and is moved into place once complete, so it never appears in an argument list, the release or the output. A different --service-user is refused, since the file is readable only by the ssh user. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
…rectory is absent Path.rglob raises FileNotFoundError on a missing directory in Python 3.11 and returns nothing in 3.12, so the remote-build step and its unit tests failed under 3.11. os.walk behaves the same on both. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
gareth-morgan-nv
requested review from
farbod-nv,
jsepulveda-nvidia and
tengw-nv
November 10, 2026 19:54
gareth-morgan-nv
force-pushed
the
gmorgan/SensingLiveKit
branch
from
November 10, 2026 22:02
1269afe to
33b09ed
Compare
gareth-morgan-nv
force-pushed
the
gmorgan/OrinDeploy
branch
from
November 10, 2026 22:02
a611267 to
770d73b
Compare
Contributor
Author
|
Closing as superseded: the camera path is now the camera_streamer architecture (SIPL/Argus sender, AVS1 over TCP, PC receiver and LiveKit bridge; see #1473-#1479). Not merged; the branch and commits are kept. 🤖 Generated with Claude Code |
Contributor
Author
|
This PR is superseded by the camera_streamer PRs:
🤖 Generated with Claude Code |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
src/plugins/sensing/scripts/deploy_orin.py, one script run on the desktop that builds the camera producer on an Orin from a git checkout and runs it as a systemd service.--source DIR,--branch NAME), including trees that lack newer CMake components. It builds onlycamera_plugin_sensingand stages the release from the build tree: the binary, its platform configs, andliblivekit*only when the binary links them. Extra CMake options go through--cmake-arg.mode(direct, the default, orlivekit), the producer'sargs, and an optionalenvmap of extra unit environment variables (LD_LIBRARY_PATHis reserved). Install prefix, service groups and the ready timeout are fixed constants rather than flags.python3, aarch64), then runs preflight on the target (L4T, CUDA,uv, SDK headers, disk) before uploading anything.currentlink, run byisaaccapture-producer.service. Refuses to replace a producer started by hand unless--replace-unmanaged, and then interrupts exactly the PIDs it listed. A failed build or transfer leaves the running producer alone; there is no automatic rollback.Capturing.marker shows frames and, for a stream with adirect=destination,direct: HOST:PORT connected. A restart inside the unit cannot satisfy it, and a stream without a destination is reported as capture-only.~/.cache/isaaccapture-deploy/last-start-failure.log.Restart=on-failure, 5 s delay, at most 5 starts in 120 s); a clean stop does not restart it. The producer ends its own process when a camera session will not stop, and relies on this.ORIN_PASSWORD(ssh viaSSH_ASKPASS, sudo via stdin, never in argv), user fromORIN_USER; the LiveKit token file, when used, stays on the Orin and only its path is passed.Validation
Run: the unit tests of the script (
tests/python/ci/test_deploy_orin.py, mocked ssh/subprocess; registered in the pre-commit workflow) pass, including config validation and unit rendering forenv; the pre-commit hooks (withSKIP=check-copyright-year) pass.Run on a real Orin (SIPL, two cameras): repeated deploys of the video-stage branch built natively, installed, replaced the running producer, and reached readiness with both sensors capturing and connected to the PC.
Not verified: the
livekitmode against a live LiveKit server in this revision; the Argus backend path.Stacked on #1461 (the Orin publisher branch).
🤖 Generated with Claude Code