Closed bit-bat closed 12 months ago
My original report might be misleading. I disconnected the phone, but Coral is still not working.
************** Setting EdgeTPU permissions ***************
Coral Vendor IDs:
"1a6e"
"18d1"
No EdgeTPU USB device was found
************************** Done **************************
[2023-05-12 03:57:56] [INFO ] [viseron.components] - Setting up component edgetpu
[2023-05-12 03:57:56] [DEBUG ] [viseron.components.edgetpu] - Available devices: [{'type': 'pci', 'path': '/dev/apex_0'}]
[2023-05-12 03:57:56] [INFO ] [viseron.components] - Setup of component edgetpu took 0.0 seconds
[2023-05-12 03:57:59] [DEBUG ] [viseron.components.edgetpu] - Loading interpreter with device pci, model /detectors/models/edgetpu/mobiledet_model.tflite
[2023-05-12 03:57:59] [DEBUG ] [viseron.components.edgetpu] - Using labels from /detectors/models/edgetpu/labels.txt
[2023-05-12 03:57:59] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic motion_detector/side_yard_cam/scan, <queue.Queue object at 0x7f0ce8a76580>
[2023-05-12 03:57:59] [ERROR ] [viseron.components.edgetpu] - Error when trying to load EdgeTPU: Failed to load delegate from libedgetpu.so.1
Hmm, whats the output of lsusb
on your host?
And what does your docker run command look like?
I have 2 m.2 pcie units set to be delivered at the end of the month / early next month. I'll report back my setup when they're in and if I have similar issues.
Great, thanks!
I JUST received them in the mail. I put one in my main computer. and I am seeing the same as OP here. It appears the m.2 cards have a different vendor ID than the USB accelerators.
$ lspci -nn | grep 089a 04:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a]
Docker Compose File:
version: "3"
services:
viseron:
image: roflcoopter/viseron:latest
container_name: viseron
volumes:
- /media/spcc-256/viseron/recordings:/recordings
- /media/spcc-256/viseron:/config
- /etc/localtime:/etc/localtime:ro
- /dev/shm:/tmp
privileged: true
restart: unless-stopped
devices:
- /dev/apex_0:/dev/apex_0
ports:
- 8888:8888
environment:
- PUID=0
- PGID=0
After some digging through rootfs/etc/cont-init.d/30-edgetpu-permission in both the container and on the host machine the vendor id of 1ac1 is not present. The product ID remains the same though. Could the Productid of 089a be used instead?
After a ton of testing i think I've been chasing nothing. While the message does state it didn't find a coraltpu device, I believe it is actually using the device so long as you passed the device correctly into the container. I'll test again tomorrow but i believe this is a non issue and maybe an opportunity to clarify in the documentation.
Nice digging! So it seems that the issue is that the script /rootfs/etc/cont-init.d/30-edgetpu-permission
is not picking up the pci card and thus falsely reports that it is not available?
That is correct! After enabling debug logging I saw that it was recognizing the pci card and I saw motion / object detection.