svc-vision: camera live view, moved from app-flutter's test tool
Camera-agnostic (--camera auto finds any V4L2 capture device and finds it again after a replug; non-MJPEG cameras are encoded), says when the camera is unavailable, paced per decision 28. Python, standard library only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install svc-vision on an Orin as the yukart-vision service.
|
||||
#
|
||||
# usage: scripts/deploy.sh [host] (default: mikkeli-orin-nano)
|
||||
#
|
||||
# Python 3.10 and the standard library only: nothing to build. The host needs
|
||||
# gst-launch-1.0 (GStreamer, part of JetPack) and v4l2-ctl (v4l-utils).
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${1:-mikkeli-orin-nano}"
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
ssh "$HOST" 'set -e
|
||||
command -v gst-launch-1.0 >/dev/null || { echo "missing gst-launch-1.0" >&2; exit 1; }
|
||||
command -v v4l2-ctl >/dev/null || { echo "missing v4l2-ctl (v4l-utils)" >&2; exit 1; }
|
||||
python3 -c "import sys; assert sys.version_info >= (3, 10)"
|
||||
mkdir -p ~/infra/svc-vision'
|
||||
scp -q src/liveview.py "$HOST:infra/svc-vision/liveview.py.new"
|
||||
scp -q deploy/yukart-vision.service "$HOST:infra/svc-vision/yukart-vision.service"
|
||||
ssh "$HOST" 'set -e
|
||||
mv ~/infra/svc-vision/liveview.py.new ~/infra/svc-vision/liveview.py
|
||||
sudo install -m 0644 ~/infra/svc-vision/yukart-vision.service /etc/systemd/system/yukart-vision.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable yukart-vision.service >/dev/null
|
||||
sudo systemctl restart yukart-vision.service
|
||||
sleep 2
|
||||
systemctl --no-pager --lines=5 status yukart-vision.service'
|
||||
Reference in New Issue
Block a user