Alternative to the .deb package - useful for quick iteration on a dev machine, or if you'd rather manage this as a container than a systemd service.
curl -fsSL https://get.docker.com | sh)git clone https://github.com/yeshaib/tgcs-fr-pred.git
cd tgcs-fr-pred
docker compose up --build
First build takes a few minutes (installing the camera SDK and OpenCV). Watch for Pipeline successfully started. in the logs.
docker-compose.yml uses:
device_cgroup_rules:
- "c 189:* rmw"
volumes:
- /dev/bus/usb:/dev/bus/usb
This is the camera SDK's own documented minimal permission set (it prints this exact hint if USB access fails) - scoped to USB device class 189, rather than granting the container full --privileged access.
If you get "No available devices": temporarily swap that block for privileged: true to check whether it's a permissions issue at all:
privileged: true
# device_cgroup_rules:
# - "c 189:* rmw"
If that fixes it, the scoped rule needs adjusting for your kernel - don't leave it on privileged: true long-term, come back and narrow it down instead.
git pull
docker compose up --build -d
docker-compose.yml as committed mounts app.py and static/ from the host, so local edits show up without a rebuild (restart the container to pick them up). For an edge deployment, drop those two volume mounts - the image should be fully self-contained, built once and shipped as-is.
<date> placeholder in it. A literal placeholder in a shell command is a landmine - it parsed as a redirect operator and broke the command. Filename is now stable (tgcs-fr-pred-source.tar.gz, no date), so the command is copy-paste safe.Dockerfile.portal, every deploy) - dropped the earlier plan to also bake a pre-built .deb into the portal, since that just reintroduces the cross-machine build problem this whole thing exists to avoid. Dependencies (OpenCV, camera SDK) are meant to be pip-installed on the target machine itself, from public PyPI, via build_deb_native.sh.build_deb.sh (the Docker cross-build script) - no longer needed or recommended.curl from the portal instead of needing a GitHub account/credentials.deb packages built cross-machine (via build_deb.sh/Docker) had a bundled venv whose bin/python symlink pointed at a path that doesn't exist on the target, causing systemctl status=203/EXEC and an endless auto-restart loop. Both build scripts now use python3 -m venv --copies; docs updated to recommend building natively on the target machine./classes) listing all 80 recognized object classes, linked from the homepagePOST /upload/{category})GET /view/docs/{name})