Open mark-hingston opened 2 months ago
I'm having the exact same problem when trying to install with Ubuntu 24.04.1 LTS
Did you ever get this problem solved?
Same issue... same question.
Thanks.
I finally got mine working following the below list of commands
uname -r
lsmod | grep apex
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
apt-get update
apt-get install gasket-dkms libedgetpu1-std -y
sh -c "echo 'SUBSYSTEM==\"apex\", MODE=\"0660\", GROUP=\"apex\"' >> /etc/udev/rules.d/65-apex.rules"
groupadd apex
adduser $USER apex
reboot
lspci -nn | grep 089a
apt install pve-headers-$(uname -r)
apt install proxmox-default-headers -y
apt install dh-dkms devscripts git -y
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
ls /dev/apex*
Same issue; Unable install via apt, unable to build from source.
Kernel: 6.8.0-45-generic OS: Ubuntu 24.04.1 LTS TPU Device: Coral M2
Same issue same problem. USB. Noble.
Got it working :) see below if that might help for your TPU Device:
LT;DR
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - ; sudo apt update
sudo apt install dh-dkms gasket-dkms libedgetpu1-std devscripts git debhelper -y #prolly redundant packages
git clone https://github.com/google/gasket-driver; cd gasket-driver
debuild -us -uc -tc -b -d
sudo sh -c "echo 'SUBSYSTEM==\"apex\", MODE=\"0660\", GROUP=\"apex\"' >> /etc/udev/rules.d/65-apex.rules"
sudo groupadd apex
sudo adduser $USER apex
after a reboot or 'modprobe -a gasket':
ls /dev/apex_0
/dev/apex_0
lspci -nn | grep 089a: 05:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a]
lsb_release -a: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04.1 LTS Release: 24.04 Codename: noble
uname -a: Linux node02 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
######## Longer version:
git clone https://github.com/google/gasket-driver; cd gasket-driver
/gasket/gasket-driver$ debuild -us -uc -tc -b -d
dpkg-buildpackage -us -uc -ui -tc -b -d
dpkg-buildpackage: info: source package gasket-dkms
dpkg-buildpackage: info: source version 1.0-18
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Coral <coral-support@google.com>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
fakeroot debian/rules clean
**dh clean --with dkms**
make: dh: No such file or directory
make: *** [debian/rules:6: clean] Error 127
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
debuild: fatal error at line 1184:
dpkg-buildpackage -us -uc -ui -tc -b -d failed
debhelper was missing: sudo apt install debhelper it created the 'gasket-dkms_1.0-18_all.deb'
debuild -us -uc -tc -b -d
dpkg-buildpackage -us -uc -ui -tc -b -d
dpkg-buildpackage: info: source package gasket-dkms
dpkg-buildpackage: info: source version 1.0-18
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Coral <coral-support@google.com>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
fakeroot debian/rules clean
dh clean --with dkms
dh_clean
debian/rules build
dh build --with dkms
dh_update_autotools_config
dh_autoreconf
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary
dh binary --with dkms
dh_testroot
dh_prep
debian/rules override_dh_install
make[1]: Entering directory '/home/ubuntu/gasket/gasket-driver'
dh_install src/* usr/src/gasket-1.0/
make[1]: Leaving directory '/home/ubuntu/gasket/gasket-driver'
dh_installdocs
dh_installchangelogs
debian/rules override_dh_dkms
make[1]: Entering directory '/home/ubuntu/gasket/gasket-driver'
dh_dkms -V 1.0
make[1]: Leaving directory '/home/ubuntu/gasket/gasket-driver'
dh_installudev
dh_perl
dh_link
dh_strip_nondeterminism
dh_compress
dh_fixperms
dh_missing
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'gasket-dkms' in '../gasket-dkms_1.0-18_all.deb'.
dpkg-genbuildinfo --build=binary -O../gasket-dkms_1.0-18_amd64.buildinfo
dpkg-genchanges --build=binary -O../gasket-dkms_1.0-18_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
fakeroot debian/rules clean
dh clean --with dkms
dh_clean
dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
Now running lintian gasket-dkms_1.0-18_amd64.changes ...
E: gasket-dkms changes: bad-distribution-in-changes-file unstable
Finished running lintian.
sudo dpkg -i ../gasket-dkms_1.0-18_all.deb
(Reading database ... 169151 files and directories currently installed.)
Preparing to unpack gasket-dkms_1.0-18_all.deb ...
Deleting module gasket-1.0 completely from the DKMS tree.
Unpacking gasket-dkms (1.0-18) over (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.8.0-45-generic 6.8.0-47-generic
Building initial module for 6.8.0-45-generic
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
Done.
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
gasket.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.8.0-45-generic/updates/dkms/
apex.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.8.0-45-generic/updates/dkms/
depmod...
Building initial module for 6.8.0-47-generic
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
Done.
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
gasket.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.8.0-47-generic/updates/dkms/
apex.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.8.0-47-generic/updates/dkms/
depmod...
sudo sh -c "echo 'SUBSYSTEM==\"apex\", MODE=\"0660\", GROUP=\"apex\"' >> /etc/udev/rules.d/65-apex.rules" sudo groupadd apex sudo adduser $USER apex
after a reboot or 'modprobe -a gasket':
ubuntu@node02:~$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),110(lxd),119(docker),1001(apex)
ubuntu@node02:~$ ls /dev/apex_0
/dev/apex_0
ubuntu@node02:~$ modinfo gasket
filename: /lib/modules/6.8.0-45-generic/updates/dkms/gasket.ko.zst
author: Rob Springer <rspringer@google.com>
license: GPL v2
version: 1.1.4
description: Google Gasket driver framework
import_ns: DMA_BUF
srcversion: 584E4F871D5CD164F02B2D2
depends:
retpoline: Y
name: gasket
vermagic: 6.8.0-45-generic SMP preempt mod_unload modversions
sig_id: PKCS#7
signer: node02 Secure Boot Module Signature key
sig_key: 3C:0E:1B:C2:50:C6:0F:F5:FE:3F:FC:10:70:9F:AC:C5:8F:FA:B2:54
sig_hashalgo: sha512
signature: C1:43:D6:7A:4F:72:07:49:14:3C:F7:01:57:88:A6:4B:BB:62:B3:63:
32:7B:7B:FB:AC:A7:70:33:BA:18:63:30:74:B7:43:74:87:7E:59:11:
<snipped>
70:4F:AD:9F:89:1A:2C:28:59:A2:28:68:6E:0C:49:DE:33:D6:FD:81:
<snipped>
BD:F1:8A:BE:C4:B6:44:D7:85:43:25:AA:CF:1F:52:B7:B8:97:BF:37:
21:59:D3:92:7F:D0:BF:D9:0C:DD:D1:9B:A4:81:4A:03
parm: dma_bit_mask:int
TEST if it actually works!
cat > Dockerfile << EOF FROM debian:10
WORKDIR /home ENV HOME /home RUN cd ~ RUN apt-get update RUN apt-get install -y git nano python3-pip python-dev pkg-config wget usbutils curl
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" \ | tee /etc/apt/sources.list.d/coral-edgetpu.list RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - RUN apt-get update RUN apt-get install -y edgetpu-examples EOF
docker build -t "coral" .
docker run -it --device /dev/apex_0:/dev/apex_0 coral /bin/bash
INYOURCONTAINER python3 /usr/share/edgetpu/examples/classify_image.py --model /usr/share/edgetpu/examples/models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --label /usr/share/edgetpu/examples/models/inat_bird_labels.txt --image /usr/share/edgetpu/examples/images/bird.bmp
---------------------------
Poecile atricapillus (Black-capped Chickadee)
Score : 0.44140625
---------------------------
Poecile carolinensis (Carolina Chickadee)
Score : 0.29296875
Description
Following the instructions here: https://coral.ai/docs/m2/get-started/#2-install-the-pcie-driver-and-edge-tpu-runtime
The install of the PCIe driver is failing:
I've tried building the driver myself but am still having issues:
Click to expand!
### Issue Type Bug, Build/Install ### Operating System Ubuntu ### Coral Device M.2 Accelerator B+M ### Other Devices _No response_ ### Programming Language Python 3.9 ### Relevant Log Output _No response_