Coral gasket-dkms drivers

Problem/Justification
Frigate focuses on the Coral Edge TPU and it would greatly help the app take advantage of this hardware without resorting to any hacky way of doing it as even developer mode fails to install the gasket-dkms drivers in EE Beta

Impact
Reading on this forum many people have requested it through the years and if you need one for testing I will gladly send the team a dual coral pcie TPU for testing.

User Story
Detection on CPU is stated in Frigate that its for testing only and only leaves us with an expensive power hungry gpu or newer cpu which not everyone has. If we can implement the drivers not only will we have a more efficient system but also have a faster detection rate than a gpu and cpu.

7 Likes

it woork fine in developer
https://forums.truenas.com/t/frigate-ix-truecharts-version-and-coral-tpu-pcie/1065/5

info
2024-09-27 17:27:58
startup
Preparing Frigate...
info
2024-09-27 17:27:58
startup
Starting Frigate...
info
2024-09-28 01:27:59
frigate.app
Starting Frigate (0.14.1-f4f3cfa)
info
2024-09-28 01:27:59
frigate.util.config
Checking if frigate config needs migration...
info
2024-09-28 01:27:59
frigate.util.config
frigate config does not need migration...
info
2024-09-28 01:27:59
peewee_migrate.logs
Starting migrations
info
2024-09-28 01:27:59
peewee_migrate.logs
There is nothing to migrate
info
2024-09-28 01:27:59
frigate.app
Recording process started: 331
info
2024-09-28 01:27:59
frigate.app
Recording process started: 340
info
2024-09-28 01:27:59
frigate.app
go2rtc process pid: 98
info
2024-09-28 01:27:59
detector.coral
Starting detection process: 359
info
2024-09-28 01:27:59
frigate.app
Output process started: 362
info
2024-09-28 01:27:59
frigate.detectors.plugins.edgetpu_tfl
Attempting to load TPU as pci
info
2024-09-28 01:27:59
frigate.detectors.plugins.edgetpu_tfl
TPU found

Was it tested in Electric Eel?

I used the method linked with RC-2, and it seems to have been fine. Unfortunately, I don’t think you’re able to use the standard app from the catalogue as it doesn’t allow you to pass devices to the container, so you are stuck with docker compose.
But just from my anecdotal experience, it’s been working well.

I noticed that Home Assistant now has a UI for selecting Devices to pass into the container.

Perhaps you should make a feature request or an issue, to add the same to the frigate app on the apps’ github?

Isn’t installing drivers through the CLI unsupported? I assume that the request would not be allowed as there is no official way to make use of it.

Now you have it in the chart version

any news about this ?

I could definitely use the coral drivers in truenas as well.

The more votes the better chances we have for the team to look at it.

I agree, Truenas scale needs to have the drivers for Coral Edge TPU devices. Frigate relies heavily on these for machine learning to detect objects in video surveillance.

I to have a Coral TPU M.2 that is recognized:
01:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a]
But have no way to utilize it because TrueNas or Frigate app can not access it.
Be great to have that build into stabile Apps in truenas.

In addition, why not include all options for object detection acceleration? I think Coral TPU is probably top on peoples list but adding the following will forego future acceleration requests, if not too time consuming to bundle the options.
Most Hardware

  • Coral EdgeTPU: The Google Coral EdgeTPU is available in USB and m.2 format allowing for a wide range of compatibility with devices.
  • Hailo: The Hailo8 AI Acceleration module is available in m.2 format with a HAT for RPi devices, offering a wide range of compatibility with devices.

AMD

  • ROCm: ROCm can run on AMD Discrete GPUs to provide efficient object detection.
  • ONNX: ROCm will automatically be detected and used as a detector in the -rocm Frigate image when a supported ONNX model is configured.

Intel

  • OpenVino: OpenVino can run on Intel Arc GPUs, Intel integrated GPUs, and Intel CPUs to provide efficient object detection.
  • ONNX: OpenVINO will automatically be detected and used as a detector in the default Frigate image when a supported ONNX model is configured.

Nvidia

  • TensortRT: TensorRT can run on Nvidia GPUs and Jetson devices, using one of many default models.
  • ONNX: TensorRT will automatically be detected and used as a detector in the -tensorrt or -tensorrt-jp(4/5) Frigate images when a supported ONNX model is configured.

Rockchip

  • RKNN: RKNN models can run on Rockchip devices with included NPUs.
    Correction: I think Tensor core option is available from the setup menu…
1 Like

Look like at least for USB version driver isnt needed?

The USB version is compatible with the widest variety of hardware and does not require a driver on the host machine. However, it does lack the automatic throttling features of the other versions.

Source: Recommended hardware | Frigate

I have the same coral TPU, but I can’t even isolate/pass through to a VM, it’s annoying.

Edit: For context, Fangtooth Beta, Frigate is running fine as an app if I through cores at it, and I have the cores to spare. But I’m running an HAOS VM, and if I can pass through the TPU to that, then I can simply start a new docker container for Frigate. Yay for Truenas scale for multiple solutions to the problem, right? This is probably my incompetence shining through more than anything, but either way it comes back down to: Apps are more efficient if not run in a VM. So pretty please can we have a way to access the drivers?

That is correct. The Coral USB will work once you enable the USB bus passthrough for the container in the Truenas app configuration setup for Frigate. However, the drivers are required for the M.2 PCIe version of the Coral device on the host, which is the reason for this feature request.

2 Likes