{"id":13521,"date":"2024-06-11T23:33:08","date_gmt":"2024-06-12T06:33:08","guid":{"rendered":"https:\/\/www.apolonio.com\/blog\/?p=13521"},"modified":"2024-06-11T23:33:08","modified_gmt":"2024-06-12T06:33:08","slug":"m-2-coral-working","status":"publish","type":"post","link":"https:\/\/www.apolonio.com\/blog\/?p=13521","title":{"rendered":"M.2 Coral Working"},"content":{"rendered":"\n<p>So it was incompatible code.<\/p>\n\n\n\n<p>Anyway I got my M.2 Coral working.  The inference on that thing is low.  Down to 6.7ms.  The USB one is hanging around at 28.4ms.<\/p>\n\n\n\n<p>Here is how I did it<\/p>\n\n\n\n<p>First I enabled the google-coral-dkms, installed it<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf copr enable kylegospo\/google-coral-dkms<br>sudo dnf install gasket-dkms<\/pre>\n\n\n\n<p>Then I modified the code in gasket_core.c which had some incompatibilities with the kernel I was using.<\/p>\n\n\n\n<p>The issue was this <a href=\"https:\/\/github.com\/KyleGospo\/gasket-dkms\/issues\/7\">https:\/\/github.com\/KyleGospo\/gasket-dkms\/issues\/7<\/a><\/p>\n\n\n\n<p>So in the file gasket_core.c I removed this<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-#if LINUX_VERSION_CODE &lt; KERNEL_VERSION(6, 4, 0)\n-    internal-&gt;class = class_create(driver_desc-&gt;module, driver_desc-&gt;name);\n-#else\n-    inte<\/pre>\n\n\n\n<p>And replaced it with<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+       internal-&gt;class = class_create(driver_desc-&gt;name);<\/pre>\n\n\n\n<p>Then I did <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">dkms autoinstall<br>modprobe apex<br>modprobe gasket<\/pre>\n\n\n\n<p>And it worked, there was a \/dev\/apex device<\/p>\n\n\n\n<p>I then enabled it in the config.yml for frigate itself<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">detectors:\n  coral_usb:\n    type: edgetpu\n    device: usb\n  coral_pci:\n    type: edgetpu\n    device: pci<\/pre>\n\n\n\n<p>And enabled it in docker to pass through<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    volumes:\n      - \/dev:\/dev<\/pre>\n\n\n\n<p>Seems complicated, but figured it out.<\/p>\n\n\n\n<p>Weight: 343.0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So it was incompatible code. Anyway I got my M.2 Coral working. The inference on that thing is low. Down to 6.7ms. The USB one is hanging around at 28.4ms. Here is how I did it First I enabled the &hellip; <a href=\"https:\/\/www.apolonio.com\/blog\/?p=13521\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,25,14,11,3,9],"tags":[],"class_list":["post-13521","post","type-post","status-publish","format-standard","hentry","category-coding","category-fitbit","category-new-toys","category-technical","category-training","category-weighin"],"_links":{"self":[{"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13521"}],"version-history":[{"count":1,"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13521\/revisions"}],"predecessor-version":[{"id":13522,"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13521\/revisions\/13522"}],"wp:attachment":[{"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.apolonio.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}