[SOLVED] Coral TPU on Proxmox 9

XabiX

Active Member
Nov 8, 2017
21
1
43
46
Hello Team,

I don't seem to be able to install mu USB Coral TPU within Proxmox 9.
root@proxmox:~# lsusb | grep -E "(1a6e:089a|18d1:9302)"
Bus 002 Device 004: ID 1a6e:089a Global Unichip Corp.

I installed pve headers but I get:

Code:
 dpkg-buildpackage -us -uc -ui -tc -b
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
 debian/rules clean
dh clean --with dkms
   dh_clean
 debian/rules binary
dh binary --with dkms
   dh_update_autotools_config
   dh_autoreconf
   create-stamp debian/debhelper-build-stamp
   dh_prep
   debian/rules override_dh_install
make[1]: Entering directory '/root/gasket-dkms'
dh_install src/* usr/src/gasket-1.0/
make[1]: Leaving directory '/root/gasket-dkms'
   dh_installdocs
   dh_installchangelogs
   debian/rules override_dh_dkms
make[1]: Entering directory '/root/gasket-dkms'
dh_dkms -V 1.0
make[1]: Leaving directory '/root/gasket-dkms'
   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)                                                                                                                                            
 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 ...                                                                                                                                                      
running with root privileges is not recommended!                                                                                                                                                              
W: gasket-dkms: old-fsf-address-in-copyright-file                                                                                                                                                              
Finished running lintian.                                                                                                                                                                                      
root@proxmox:~/gasket-dkms# cd ..                                                                                                                                                                              
root@proxmox:~# sudo dpkg -i gasket-dkms_*.deb                                                                                                                                                                
Troubleshooting                                                                                                                                                                                                
If module compilation fails:                                                                                                                                                                                  
                                                                                                                                                                                                               
bash                                                                                                                                                                                                          
# Ensure proper kernel headers

I also tried with https://coral.ai/software/ website but apt-key is not working anymore.

Merci
 
Last edited:
How are you using the Coral USB TPU? I'm curious what benefit you get from installing the driver on the PVE host.
 
I use it with lxc as I get better performances than within a vm. So I don't have missed frames anymore on the detection streams.

And you?
 
You don't need any driver on the host in order to use the USB coral in an lxc.

You just pass the usb port to the container. The container needs to have the driver installed.
 
I'm using it in an unprivileged lxc running frigate (docker). I did not find it necessary to install a driver on the PVE host. The mini-pcie versions though do require the driver on the host (for lxc use).
 
Last edited:
  • Like
Reactions: nautilus7
I'm using it in an unprivileged lxc running frigate (docker). I did not find it necessary to install a driver on the PVE host. The mini-pcie versions though do require the driver on the host (for lxc use).
I have then the same setup. So not sure why it was not working. Can you show your.conf special cmds to pass the device? Merci
 
The pertinent parts of lxc.conf for coral access and igpu encoder.

Code:
features: keyctl=1,nesting=1
unprivileged: 1
dev0: /dev/dri/renderD128,gid=106
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir

106 is the render group in my debian docker lxc. I am aware this exposes all usb devices to this container, so I am open to ways to improve that.

udev rules to enable unprivileged access to usb device (pre/post initialised state). This is more permissive than I'd like so I need to sort that out.

Code:
#/etc/udev/rules.d/71-edgetpu.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a6e", ATTRS{idProduct}=="089a", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9302", MODE="0666"

With the USB coral, no driver as such is needed. Just the appropriate libraries.
 
Last edited: