solved - Frigate with Docker and Coral TPU

  • Hello, I have installed Docker and also frigate. Its working fine with detector cpu, but now I got also an USB Coral TPU.

    The TPU is found in the host as:

    Code
    root@DXP2800-A136:~# lsusb
    Bus 004 Device 015: ID 18d1:9302 Google Inc.

    So i added the device in the docker compose as followed:

    Code
    devices:
    - /dev/bus/usb//004/015 # Passes the USB Coral

    and the config.yaml

    YAML
    detectors:
    coral:
    type: edgetpu
    device: usb

    It seems to work, but I still get the following error messages:

    Code
    2025-02-22 15:00:06.277717349 [2025-02-22 15:00:03] detector.coral INFO : Starting detection process: 422
    2025-02-22 15:00:06.277886619 [2025-02-22 15:00:03] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
    2025-02-22 15:00:06.278527292 [2025-02-22 15:00:06] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
    2025-02-22 15:00:06.278670378 [2025-02-22 15:00:06] frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.

    Anyone here who already is using an DXP2800 with docker and frigate/Coral USB TPU?

    Any idea what I can do to solve the problem?

    Best regards, Stefan

  • Go to Best Answer
  • Hi Stefan,

    welcome to our Community!

    I have a DXP2800 and also a Google Coral USB TPU. Can you provide me your container stack? Then I can maybe test it next week.

    Regards Mike

  • Dear Mike,

    this is my Frigate container:

    It would be great if you can find a solution. I am using the Coral TPU in the front USB port. In which port do you have it connected?

    Best regards, Stefan

  • - /dev/bus/usb//004/015 # Passes the USB Coral, needs to be modified for other versions

    Something might be missing here.

    - /dev/bus/usb//004/015:/dev/bus/usb//004/015 # Passes the USB Coral, needs to be modified for other versions

  • I got it. It´s solved !!!

    Yesterday I found out that the usb was passed through, but the configuration did not recognize the coral tpu. And due to the fact that the number of the device mounted after each reboot 004/016, 004/017 ... I changed the setting in the settings in the composer now to.

    devices:

    - "/dev/bus/usb/004:/dev/bus/usb/004"

    # /dev/bus/usb//004 # Passes the USB Coral, needs to be modified for other versions

    In order to get the tpu module running I tried chatgpt for help and reinstalled the module again via telnet to the ugreen and by running the installation for debian. I still had some problems with duplicate lines in the config files, which I realized by uploading the log to chatgpt. When I deleted the duplicate lines the installation finished and now the TPU is recognized, the cpu dropped from 80% (8 cameras) to nearly 25%.

    In the next days I will need to optimize the setup of all the cameras and the different resolutions, then the integration with HA can start.

    Thanks to everyone trying to help.

    Best regards, Stefan:D

  • Ich hatte jetzt auch mal Zeit den Google Coral an einer DXP2800 mit Frigate zu testen:

    SSH: lsusb

    Code
    root@DXP2800:~# lsusb
    Bus 004 Device 003: ID 18d1:9302 Google Inc.
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    In der Config-YAML von Frigate folgendes ergänzt:

    YAML
    detectors:
      coral:
        type: edgetpu
        device: usb

    Portainer-Log:

    Code
    frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb2025-03-14
    frigate.app                    INFO    : Output process started: 
    frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found

    This image is exclusive to our members!
    Please log in or register for free to view graphics and attachments.

    VG
    Mike

  • You can’t just “add” the Coral USB accelerator to a container in most NAS GUIs without explicitly mapping it through to Docker. You basically need to do two things:

    1. Make sure your NAS sees the Coral USB device, SSH: lsusb

    2. Pass the USB device to your container. In Docker CLI this is done with --device, for example:

    --device /dev/bus/usb/001/002:/dev/bus/usb/001/002 ...

    or Stack:

    YAML
    devices:
         
      - /dev/bus/usb:/dev/bus/usb
  • I was specifically talking about doing it via GUI but it doesn't matter now. I've installed portainer and got everything I need done so far.


    For anyone searching, I was setting up the Google Cotal TPU with frigate. I have the container running in privileged mode so the Coral was automatically detected after its initialization. with mo device settings meeded in rhe docker config

    Here's info about initialization. of th Coral

    https://docs.frigate.video/troubleshooting/edgetpu

Participate now!

Join our community with over 10,000 members!

Register yourself now for free to get full access to all content, graphics, downloads and other exclusive features!