MAY THE 4TH BE WITH YOU!… and also this guide.
I have not tested it in Ubuntu 24.04 but it may work. Let me know in the comments if you try! Update: Myself and others in the comments are running this successfully on 24.04!
This brief guide has been revised from:
https://coral.ai/docs/m2/get-started#2-install-the-pcie-driver-and-edge-tpu-runtime
This will essentially be the first part of a few parts coming for Frigate and Home Assistant. (must. find. motivation!)
First, we need to setup the apt repository, and install the required packages:
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/google-coral-edgetpu.gpg
sudo apt update
sudo apt install gasket-dkms libedgetpu1-std
If gasket-dkms fails (it probably will — if it doesn’t, skip down to the udev rule section):
sudo apt purge gasket-dkms
git clone https://github.com/KyleGospo/gasket-dkms
apt install dkms debhelper libfuse2 dh-dkms devscripts
cd gasket-dkms; debuild -us -uc -tc -b
You’ll have a .deb file one folder up (e.g. gasket-dkms_1.0-18_all.deb):
cd ..
ls *.deb
dpkg -i gasket-dkms*.deb
We need to add a udev rule for permission to the hardware device:
sudo sh -c "echo 'SUBSYSTEM==\"apex\", MODE=\"0660\", GROUP=\"docker\"' >> /etc/udev/rules.d/65-apex.rules"
If you don’t want to use the docker group, replace docker in the udev command string:
sudo groupadd apex
sudo usermod -a -G apex your_linux_username
sudo sh -c "echo 'SUBSYSTEM==\"apex\", MODE=\"0660\", GROUP=\"apex\"' >> /etc/udev/rules.d/65-apex.rules"
REBOOT!
Verify the device is detected and available:
ls -alh /dev/apex*
crw-rw---- 1 root docker 120, 0 May 4 20:34 /dev/apex_0
I had an issue on Ubuntu 24.04 where the “debuild” command would fail with:
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 9)
I had to add “debhelper” to the end of the list to install with “apt”.
Hi,
Could you explain where you added debhelper?
Just run a sudo apt install debhelper
It’s an apt package
Thank you for that! I have since added it to the list of packages now.
I spent all day trying to get coral working again after upgrading, following different approaches. Arrived back here on my thousandth google search and remembered having tried this too… Then read the reply about adding the `debhelper` package. OMG! Thank you all so much!
Thank you! Sorry, my emails had seemingly stopped working and I missed this comment.
dpkg -i gasket-dkms-*.deb should read dkms_* with an underscore, not a hyphen, at least when I did this on Ubuntu 24.04. Other than that, great guide!
You’re absolutely right! I’ve removed the hyphen and explained the filename a little better above the code block.
Thank you!
Thank you so much for sharing this solution – it helped me a lot after struggling with the “gasket-dkms” build failure. Thanks to your instructions, my Coral PCIe chip is now working perfectly with Frigate in Docker on Ubuntu 24.04.2 LTS (kernel 6.8.0-60-generic). Great job!
Just a quick note: I also had to install debhelper using “sudo apt install debhelper”.
Thank you! I’ve added debhelper to the apt list to hopefully help others in the future as it seems fairly well required at this point.
I’ve also updated the title to reflect 24.04 is supported!
Excellent write up! It worked for me on 24.04 and like Sebastian I needed the additional dependency of debhelper
Thank you! I’ve added it to the list of packages to install as it seems everyone has had an issue with it, sorry for that!
I get an error at the dpkg step:
user@user:~$ sudo dpkg -i gasket-dkms_*.deb
Selecting previously unselected package gasket-dkms.
(Reading database … 201285 files and directories currently installed.)
Preparing to unpack gasket-dkms_1.0-18_all.deb …
Unpacking gasket-dkms (1.0-18) …
Setting up gasket-dkms (1.0-18) …
Loading new gasket-1.0 DKMS files…
Deprecated feature: REMAKE_INITRD (/usr/src/gasket-1.0/dkms.conf)
Building for 6.14.0-27-generic
Building initial module for 6.14.0-27-generic
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
ERROR: Cannot create report: [Errno 17] File exists: ‘/var/crash/gasket-dkms.0.crash’
Error! Bad return status for module build on kernel: 6.14.0-27-generic (x86_64)
Consult /var/lib/dkms/gasket/1.0/build/make.log for more information.
dpkg: error processing package gasket-dkms (–install):
installed gasket-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
gasket-dkms
Hey there! Not sure why you’re getting that error. I am using Kernel 6.8.0 however. Google seems to suggest it could be due to missing linux-headers
Make sure you have the correct linux-headers installed for your kernel version: