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.
18 lines
356 B
Plaintext
18 lines
356 B
Plaintext
[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
|