blumeops/ansible/roles/frigate_detector/tasks/main.yml
Erich Blume dc4d35024f Add Apple Silicon ZMQ detector for Frigate
Moves object detection from ONNX CPU (~117ms/frame) to the
apple-silicon-detector running natively on indri via CoreML/Neural Engine
(~15ms), communicating with Frigate over ZMQ (tcp://host.minikube.internal:5555).

- New ansible role `frigate_detector` with LaunchAgent
- Switch Frigate configmap from ONNX to ZMQ detector
- Remove detect FPS cap (no longer needed with fast inference)
- Update docs and add changelog fragment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:11:35 -08:00

48 lines
1.8 KiB
YAML

---
# Apple Silicon ZMQ detector for Frigate
# Runs natively on macOS, using CoreML / Neural Engine for ~15ms inference.
# Communicates with Frigate via ZMQ over TCP.
#
# ONE-TIME SETUP (before running ansible):
#
# 1. Clone the repo:
# ssh indri 'git clone https://github.com/frigate-nvr/apple-silicon-detector.git ~/code/3rd/apple-silicon-detector'
#
# 2. Install dependencies:
# ssh indri 'cd ~/code/3rd/apple-silicon-detector && make install'
#
# 3. Run ansible to deploy LaunchAgent:
# mise run provision-indri -- --tags frigate_detector
- name: Verify apple-silicon-detector repo exists
ansible.builtin.stat:
path: "{{ frigate_detector_dir }}/Makefile"
register: frigate_detector_stat
- name: Fail if apple-silicon-detector not found
ansible.builtin.fail:
msg: |
apple-silicon-detector not found at {{ frigate_detector_dir }}.
Please clone and install first:
ssh indri 'git clone {{ frigate_detector_repo }} {{ frigate_detector_dir }}'
ssh indri 'cd {{ frigate_detector_dir }} && make install'
when: not frigate_detector_stat.stat.exists
- name: Deploy frigate-detector LaunchAgent plist
ansible.builtin.template:
src: mcquack.eblume.frigate-detector.plist.j2
dest: ~/Library/LaunchAgents/mcquack.eblume.frigate-detector.plist
mode: '0644'
notify: Restart frigate-detector
- name: Check if frigate-detector LaunchAgent is loaded
ansible.builtin.command: launchctl list mcquack.eblume.frigate-detector
register: frigate_detector_launchctl_check
changed_when: false
failed_when: false
- name: Load frigate-detector LaunchAgent if not loaded
ansible.builtin.command: launchctl load ~/Library/LaunchAgents/mcquack.eblume.frigate-detector.plist
when: frigate_detector_launchctl_check.rc != 0
changed_when: true
failed_when: false