Closed TrungLam closed 2 years ago
I removed the second try block to see what the ValueError looks like:
try:
interpreter = Interpreter(model_path=self.config.model,
experimental_delegates=[load_delegate('libedgetpu.so.1.0')])
# This might fail the first time as this seems to load the drivers for the EdgeTPU the first time.
# Doing it again will load the driver.
except ValueError:
interpreter = Interpreter(model_path=self.config.model,
experimental_delegates=[load_delegate('libedgetpu.so.1.0')])
And got
2022-07-18 05:11:37,708 - doods.doods - ERROR - Could not create detector tflite/default: Mmap of '10' at offset '0' failed with error '19'.
So when you first plug in the coral, run lsusb
and it should show the device with a certain name. The first time you run doods it will load some driver into the Coral and when you run lsusb
again it will have a different name. I can't remember what the names were. Can you confirm that bit is working?
Thanks for taking a look!
I replugged the coral device, and before running doods, its:
Bus 002 Device 008: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 007: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 005: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Bus 002 Device 003: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 012: ID 1a6e:089a Global Unichip Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 003: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Run doods:
2022-07-18 15:52:24,448 - doods.doods - ERROR - Could not create detector tflite/default: Could not load EdgeTPU detector: Mmap of '10' at offset '0' failed with error '19'.
Mmap of '10' at offset '0' failed with error '19'.
2022-07-18 15:52:24,755 - uvicorn.error - INFO - Started server process [1]
2022-07-18 15:52:24,757 - uvicorn.error - INFO - Waiting for application startup.
2022-07-18 15:52:24,757 - uvicorn.error - INFO - Application startup complete.
2022-07-18 15:52:24,758 - uvicorn.error - INFO - Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
lsub result:
Bus 002 Device 008: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 007: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 005: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Bus 002 Device 003: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 013: ID 18d1:9302 Google Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 003: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
So it is working.. The Global Unichip
is the "before" and the Google Inc
is the "after" the driver has been loaded. From what I can see error 19 is "No such device" though which is pretty confusing. I am completely guessing at this point but make sure libusb
and maybe libusb-1
are installed on your docker host system. You can also try setting the environment UDEV=1
in the docker container.
$ dpkg -l | grep libusb
ii libusb-0.1-4:arm64 2:0.1.12-32 arm64 userspace USB programming library
ii libusb-1.0-0:arm64 2:1.0.24-3 arm64 userspace USB programming library```
And running with UDEV=1 didn't work.
I tried running the container with the coral device on my laptop and it succeeds with little issue.
I have a second Pi 4B that's running home assistant core os. I spun up a doods2 addon from your repo: https://github.com/snowzach/hassio-addons/tree/master/doods2
And I get the same error :(. I had your original doods container working on the same Pi 4b for a long time before I recently move home assistant core os onto it.
I'm going to try on distro hopping on my Pi 3 tomorrow and seeing if it's an OS/conflicting kernel/pkg issue.
It's working on my Pi 3B+ with fresh install of Rasbian OS Lite. I don't know if I should be happy or sad haha.
Summary of devices I tried: Pi 4B 8GB Rasbian OS Lite with OMV installed - Failed Pi 4B 4GB Home Assistant Core OS - Failed
Laptop Arch Linux - Succeed Pi 3B+ 1GB Fresh Rasbian OS Lite - Succeed
That's really strange. There must be some sort of issue with the OS. I have a rasberry pi 4, I'll have to tinker with it. Gotta be some sore of USB library issue.
I had the same problem - for me it was a permissions issue. Once I gave access to the docker user to /dev/bus/usb on host and restarted doods2 container it worked straight away.
I'm going to close this one. Re-Open if still an issue.
Hi there,
I need help with my doods2 setup. I'm trying to start doods2 with my coral usb device and it's failing to create the tflite detector.
config.yaml
I'm running on a Raspberry Pi 4B. I've tried to connect the coral device straight into the USB2.0 and USB3.0 pi slots as well as connected to a powered USB3.0 hub.
When I attach the shell of the container and check for libedgetpu.so.1.0, I can see it present.