gasket-driver: Install Coral EdgeTPU driver
The *gasket-driver* container installs the `gasket` and `apex` kernel modules, which provide the driver for the Google Coral EdgeTPU AI accellerator module. The container image must be built ahead of time, of course, and contains modules built for a specific Fedora kernel version. The udev rule has two purposes: to set the permissions on the device node so that any user on the system can access it, and to "tag" the device so that systemd will generate a `.device` unit for it. The latter allows other units (e.g. Frigate) to express a `Requires=` and `After=` dependency on the device unit, so that they do not start until the driver is loaded.master
parent
afadd7dcf5
commit
1d71f874cf
|
@ -0,0 +1 @@
|
|||
SUBSYSTEM=="apex", MODE="0666", TAG+="systemd"
|
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=Install the gasket/apex kernel modules
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=git.pyrocufflink.net/containerimages/gasket-driver:%v
|
||||
PodmanArgs=--privileged
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
ExecStop=/usr/sbin/rmmod apex
|
||||
ExecStop=/usr/sbin/rmmod gasket
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,19 @@
|
|||
variant: fcos
|
||||
version: 1.4.0
|
||||
|
||||
storage:
|
||||
files:
|
||||
- path: /etc/containers/systemd/gasket-driver.container
|
||||
mode: 0644
|
||||
contents:
|
||||
local: gasket-driver.container
|
||||
- path: /etc/udev/rules.d/65-apex.rules
|
||||
mode: 0644
|
||||
contents:
|
||||
local: 65-apex.rules
|
||||
|
||||
systemd:
|
||||
units:
|
||||
- name: gasket-driver.service
|
||||
enabled: true
|
||||
|
Loading…
Reference in New Issue