feat(darwin): run Frigate ANE object detector as a launchd agent on dungeon#63
Merged
Merged
Conversation
…ungeon Add launchd.user.agents.frigate-detector running the native frigate-nvr/apple-silicon-detector, so Frigate (inside OrbStack's Linux VM, which can't reach the ANE) can offload object detection to the Apple Neural Engine over ZMQ/TCP. Mirrors the existing native-exporter agent pattern. Document the one-time clone + venv install in darwin-post-deploy.md (the repo is not auto-cloned).
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.
Why
Frigate's CPU object detector was the single biggest CPU consumer on dungeon (~64% of a ~130% total).
Frigate runs inside OrbStack's Linux VM, which can't reach the Apple Neural Engine, so the detector
has to run natively on the Mac and Frigate connects to it over ZMQ/TCP. (Companion change in the
home-lab repo points Frigate at it.)
What
launchd.user.agents.frigate-detectortonixos/hosts/macs/dungeon/default.nix, running thenative
frigate-nvr/apple-silicon-detector(
venv/bin/python3 detector/zmq_onnx_client.py, defaults totcp://*:5555,--model AUTO). Mirrorsthe existing native-exporter agent pattern (node_exporter / macmon / glances):
RunAtLoad,KeepAlive, logs to~/Library/Logs/frigate-detector.log.nixos/docs/darwin-post-deploy.md(the detector repois not auto-cloned).
Deploy
The detector repo + venv must exist first (see the post-deploy checklist), then
darwin-rebuild switchstarts the agent. Verify withtail ~/Library/Logs/frigate-detector.log→ "ZMQ server successfully bound to tcp://*:5555".🤖 Generated with Claude Code