Frigate IX Truecharts version and coral TPU pcie

I’ve seen questions by others like MrCaspan however I cannot register to the old community as it is read only now, so will post this here…

Just wanted to share that I managed to pass thru my pcie nvme Coral TPU to the Frigate IX app (truecharts) by following:

Then adding as you would a usb mount, but changing both device addresses to /dev/apex_0
Restart frigate app and it there…

2 Likes

Would love to hear some other experiences on the coral USB version with frigate. I posted here all my data.

I can’t get past the reset errors. Same thing with truecharts and truenas version. Read this about some advanced settings for USB for sphere setup not sure it could apply.

Heads up I authored the thread about the m.2 on the TrueCharts discord, I’ll updating to Dragonfish soon so I’ll update it as well there. Also insert 20 warnings here about dev tools / installing apt-get can brick your system lol

Wouldn’t it be simpler to run it in a Vm?

I’ve upgraded to Dragonfish, it blew away the apex modules etc…

How I got coral working:

enabled dev mode via command > install-dev-tools

Ran this step of the script: (remove ## as I can’t post links being a new member)

#!/bin/sh
mkdir /etc/apt/keyrings
echo “deb [signed-by=/etc/apt/keyrings/coral.gpg] ht##tps://packages.cloud.google.com/apt## coral-edgetpu-stable main” | tee /etc/apt/sources.list.d/coral-edgetpu.list
wget -O- ht##tps://packages.cloud.google.com/apt/doc/apt-key.gpg## | gpg --dearmor | sudo tee /etc/apt/keyrings/coral.gpg > /dev/null
apt-get update
apt-get install gasket-dkms libedgetpu1-std
sh -c “echo ‘SUBSYSTEM=="apex", MODE="0660", GROUP="apex"’ >> /etc/udev/rules.d/65-apex.rules”
groupadd apex
modprobe apex
udevadm control --reload-rules

It failed to install on newer kernel…

“Error! Bad return status for module build on kernel: 6.6.20-production+truenas (x86_64)”

Proceed at your own risk :slight_smile: This installs a bunch of packages that could break Truenas functionality, but I like to to live on the (coral) edge…

root@truenas[~]# sudo apt install devscripts debhelper dh-dkms -y
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
dh-dkms is already the newest version (3.0.10-8+deb12u1).
The following additional packages will be installed:
autoconf automake autopoint autotools-dev dctrl-tools debian-keyring dh-autoreconf dh-strip-nondeterminism diffstat distro-info-data dput dwz equivs gettext intltool-debian libaliased-perl libapt-pkg-perl libarchive-cpio-perl
libarchive-zip-perl libarray-intspan-perl libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libberkeleydb-perl libcapture-tiny-perl libcgi-fast-perl libcgi-pm-perl libclass-data-inheritable-perl
libclass-inspector-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl libcommon-sense-perl libconfig-tiny-perl libconst-fast-perl libcontextual-return-perl libconvert-binhex-perl libcpanel-json-xs-perl
libdata-dpath-perl libdata-dump-perl libdata-messagepack-perl libdata-optlist-perl libdata-validate-domain-perl libdata-validate-ip-perl libdata-validate-uri-perl libdebhelper-perl libdevel-callchecker-perl libdevel-size-perl
libdevel-stacktrace-perl libdistro-info-perl libdynaloader-functions-perl libemail-address-xs-perl libencode-locale-perl libexception-class-perl libexporter-tiny-perl libfcgi-bin libfcgi-perl libfcgi0ldbl libfeature-compat-class-perl
libfeature-compat-try-perl libfile-basedir-perl libfile-chdir-perl libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl libfile-stripnondeterminism-perl libfile-touch-perl libfile-which-perl libfont-afm-perl libfont-ttf-perl
libfreezethaw-perl libgit-wrapper-perl libgitlab-api-v4-perl libgpgme11 libhtml-form-perl libhtml-format-perl libhtml-html5-entities-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tokeparser-simple-perl libhtml-tree-perl
libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhttp-tiny-multipart-perl libimport-into-perl libindirect-perl libio-html-perl libio-interactive-perl libio-prompter-perl
libio-pty-perl libio-sessiondata-perl libio-socket-ssl-perl libio-string-perl libio-stringy-perl libipc-run-perl libipc-run3-perl libipc-system-simple-perl libiterator-perl libiterator-util-perl libjson-maybexs-perl libjson-perl
libjson-xs-perl liblist-compare-perl liblist-someutils-perl liblist-someutils-xs-perl liblist-utilsby-perl liblog-any-adapter-screen-perl liblog-any-perl libltdl-dev liblwp-mediatypes-perl liblwp-protocol-https-perl
libmail-sendmail-perl libmailtools-perl libmarkdown2 libmath-base85-perl libmime-tools-perl libmldbm-perl libmodule-implementation-perl libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl libnamespace-clean-perl
libnet-domain-tld-perl libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libobject-pad-perl libpackage-stash-perl libpackage-stash-xs-perl libparams-classify-perl
libparams-util-perl libpath-iterator-rule-perl libpath-tiny-perl libperlio-gzip-perl libperlio-utf8-strict-perl libpod-constants-perl libpod-parser-perl libproc-processtable-perl libre-engine-re2-perl libreadonly-perl libref-util-perl
libref-util-xs-perl libregexp-ipv6-perl libregexp-pattern-license-perl libregexp-pattern-perl libregexp-wildcards-perl librole-tiny-perl libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl libsoap-lite-perl
libsocket6-perl libsort-versions-perl libstrictures-perl libstring-copyright-perl libstring-escape-perl libstring-license-perl libstring-shellquote-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl
libsub-install-perl libsub-name-perl libsub-override-perl libsub-quote-perl libsyntax-keyword-try-perl libsys-cpuaffinity-perl libsys-hostname-long-perl libtask-weaken-perl libterm-readkey-perl libtext-levenshteinxs-perl
libtext-markdown-discount-perl libtext-xslate-perl libtime-duration-perl libtime-moment-perl libtimedate-perl libtool libtry-tiny-perl libtype-tiny-perl libtype-tiny-xs-perl libtypes-serialiser-perl libunicode-utf8-perl liburi-perl
libvariable-magic-perl libwant-perl libwww-mechanize-perl libwww-perl libwww-robotrules-perl libxdelta2 libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl
libxmlrpc-lite-perl libxs-parse-keyword-perl libxs-parse-sublike-perl libxstring-perl libyaml-libyaml-perl licensecheck lintian lzop m4 patchutils pbzip2 perl-openssl-defaults pixz po-debconf pristine-tar python-apt-common python3-apt
python3-debian python3-gpg python3-magic python3-unidiff python3-xdg strace t1utils wdiff xdelta xdelta3
Suggested packages:
autoconf-archive gnu-standards autoconf-doc debtags dh-make adequate at autopkgtest bls-standalone check-all-the-things cvs-buildpackage diffoscope disorderfs dose-extra duck elpa-devscripts faketime gnuplot how-can-i-help
libdbd-pg-perl libfile-desktopentry-perl libterm-size-perl libyaml-syck-perl mmdebstrap mozilla-devscripts mutt piuparts postgresql-client pristine-lfs quilt ratt reprotest svn-buildpackage w3m mini-dinstall gettext-doc
libasprintf-dev libgettextpo-dev libdigest-hmac-perl libgssapi-perl libtool-doc libcrypt-ssleay-perl libscalar-number-perl libapache2-mod-perl2 libmime-lite-perl libnet-jabber-perl libbareword-filehandles-perl libmultidimensional-perl
gfortran | fortran95-compiler gcj-jdk libdevel-lexalias-perl libbusiness-isbn-perl libauthen-ntlm-perl libxml-sax-expatxs-perl binutils-multiarch libtext-template-perl m4-doc libmail-box-perl python-apt-doc python-pyxdg-doc wdiff-doc
The following NEW packages will be installed:
autoconf automake autopoint autotools-dev dctrl-tools debhelper debian-keyring devscripts dh-autoreconf dh-strip-nondeterminism diffstat distro-info-data dput dwz equivs gettext intltool-debian libaliased-perl libapt-pkg-perl
libarchive-cpio-perl libarchive-zip-perl libarray-intspan-perl libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libberkeleydb-perl libcapture-tiny-perl libcgi-fast-perl libcgi-pm-perl
libclass-data-inheritable-perl libclass-inspector-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl libcommon-sense-perl libconfig-tiny-perl libconst-fast-perl libcontextual-return-perl libconvert-binhex-perl
libcpanel-json-xs-perl libdata-dpath-perl libdata-dump-perl libdata-messagepack-perl libdata-optlist-perl libdata-validate-domain-perl libdata-validate-ip-perl libdata-validate-uri-perl libdebhelper-perl libdevel-callchecker-perl
libdevel-size-perl libdevel-stacktrace-perl libdistro-info-perl libdynaloader-functions-perl libemail-address-xs-perl libencode-locale-perl libexception-class-perl libexporter-tiny-perl libfcgi-bin libfcgi-perl libfcgi0ldbl
libfeature-compat-class-perl libfeature-compat-try-perl libfile-basedir-perl libfile-chdir-perl libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl libfile-stripnondeterminism-perl libfile-touch-perl libfile-which-perl
libfont-afm-perl libfont-ttf-perl libfreezethaw-perl libgit-wrapper-perl libgitlab-api-v4-perl libgpgme11 libhtml-form-perl libhtml-format-perl libhtml-html5-entities-perl libhtml-parser-perl libhtml-tagset-perl
libhtml-tokeparser-simple-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhttp-tiny-multipart-perl libimport-into-perl libindirect-perl libio-html-perl
libio-interactive-perl libio-prompter-perl libio-pty-perl libio-sessiondata-perl libio-socket-ssl-perl libio-string-perl libio-stringy-perl libipc-run-perl libipc-run3-perl libipc-system-simple-perl libiterator-perl
libiterator-util-perl libjson-maybexs-perl libjson-perl libjson-xs-perl liblist-compare-perl liblist-someutils-perl liblist-someutils-xs-perl liblist-utilsby-perl liblog-any-adapter-screen-perl liblog-any-perl libltdl-dev
liblwp-mediatypes-perl liblwp-protocol-https-perl libmail-sendmail-perl libmailtools-perl libmarkdown2 libmath-base85-perl libmime-tools-perl libmldbm-perl libmodule-implementation-perl libmodule-runtime-perl libmoo-perl
libmoox-aliases-perl libmouse-perl libnamespace-clean-perl libnet-domain-tld-perl libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libobject-pad-perl
libpackage-stash-perl libpackage-stash-xs-perl libparams-classify-perl libparams-util-perl libpath-iterator-rule-perl libpath-tiny-perl libperlio-gzip-perl libperlio-utf8-strict-perl libpod-constants-perl libpod-parser-perl
libproc-processtable-perl libre-engine-re2-perl libreadonly-perl libref-util-perl libref-util-xs-perl libregexp-ipv6-perl libregexp-pattern-license-perl libregexp-pattern-perl libregexp-wildcards-perl librole-tiny-perl
libsereal-decoder-perl libsereal-encoder-perl libset-intspan-perl libsoap-lite-perl libsocket6-perl libsort-versions-perl libstrictures-perl libstring-copyright-perl libstring-escape-perl libstring-license-perl
libstring-shellquote-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-override-perl libsub-quote-perl libsyntax-keyword-try-perl libsys-cpuaffinity-perl
libsys-hostname-long-perl libtask-weaken-perl libterm-readkey-perl libtext-levenshteinxs-perl libtext-markdown-discount-perl libtext-xslate-perl libtime-duration-perl libtime-moment-perl libtimedate-perl libtool libtry-tiny-perl
libtype-tiny-perl libtype-tiny-xs-perl libtypes-serialiser-perl libunicode-utf8-perl liburi-perl libvariable-magic-perl libwant-perl libwww-mechanize-perl libwww-perl libwww-robotrules-perl libxdelta2 libxml-libxml-perl
libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxmlrpc-lite-perl libxs-parse-keyword-perl libxs-parse-sublike-perl libxstring-perl libyaml-libyaml-perl licensecheck lintian
lzop m4 patchutils pbzip2 perl-openssl-defaults pixz po-debconf pristine-tar python-apt-common python3-apt python3-debian python3-gpg python3-magic python3-unidiff python3-xdg strace t1utils wdiff xdelta xdelta3
0 upgraded, 231 newly installed, 0 to remove and 3 not upgraded.

Then run the following:

git clone  https://github.com/google/gasket-driver
cd gasket-driver
debuild -us -uc -tc -b -d
cd ..
dpkg -i gasket-dkms_1.0-18_all.deb
reboot

Both my pcie /dev/apex_0 /dev/apex_1 are present and working as before in frigate.

1 Like

Simpler sure, but not necessary, especially if you’re running TrueCharts or another 3rd party app repository, aka no eligible for iX support anyways.

Can confirm new steps work as per @campagnolo , just tested myself, can see the ls /dev/apex_0 and my Frigate works with my coral detector lol

By not necessary what do you mean?

A virtual machine is Tried/True technology. KVM is a highly mature product, and it allows you to use standard tools inside. Time investment is low, stability is high. Computers are so fast these days that the overhead of virtualization is almost negligible.

It’s cool that you’ve done this, not trying to discourage you or anything. I just don’t understand. In my opinion this solution is a high time investment for a more brittle solution.

Given the track record of TrueCharts, I wouldn’t use it for anything more than a few throw away apps. I really like Scrutiny and Uptime Kuma, and I use them with hostpath mounts. But these apps aren’t really doing anything from a CPU cycle perspective. At least not compared to things like Frogate, Blue Iris or Plex.

Production, stable solutions are going to be much easier to achieve with virtual machines. Resource intensive containers like this just don’t make sense unless you need to scale horizontally.

The thread clearly states TrueCharts and Coral TPU, like you said, you do you, run a VM, run HaOS, seperate your storage from all your apps, etc

No, in fact I do it all in TrueNAS as my hypervisor.

I’m genuinely interested in understanding why this route is the path you’re interested in pursuing