-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pineboards Hat AI! Dual Edge Coral TPU Bundle #648
Comments
See existing issue about Coral M.2 Dual Edge TPU support on Pi: #318 |
I'm getting one of these in the next few days. I'm excited to test if it's possible to host a local AI server using something like CodeProject.AI on a Pi5. I have a Blue Iris server running on my network and having a central location to send AI requests to (instead of having to use a power hungry GPU) would be fantastic. That paired with using one of the Wave Share POE hats would make it a super easy and compact solution....if it works ;) |
I've been running this hat alongside a Wave Share POE hat for a few days now and it's been working without issue. I have a Blue Iris server running on a Win11 machine sending AI requests over network to it. Previously I was running GPU AI detection, which takes a ton of power on an RTX 3060. I tried to move to the Coral dual edge TPU using a PCIe adapter ( https://www.makerfabs.com/dual-edge-tpu-adapter.html ) but Windows was never fully happy with it and it often crashed, reverting back to CPU/GPU AI detection and again using a ton of power. Here's a quick setup guide if anyone wants to try to set up CodeProject.AI with this hat and a Coral Dual Edge TPU. Notes: A lot of the guide comes condensed from PineBoards' and CodeProject.AI's instructions. (And thanks to Jeff for the PCIe Gen 3.0 code ;) ) Start with a fresh install of PiOS Lite 64-bit and connect using your SSH program of choice. First boot update:
Update the kernel to the latest version:
Install docker:
Add your user to the docker group:
Open the Pi's config file in Nano:
Add the following lines to the bottom of the file:
Save and close the file by pressing CTRL+X, Y to confirm, and Enter to exit. Reboot the Pi:
Install rpi-source to Fetch Kernel Headers, then fetch the Kernel Headers:
Add the Google Coral Edge TPU package repository and import the GPG key:
Update your package list:
Install the necessary packages:
Clone the Gasket Driver repo:
Change into the directory and build the driver:
Go back to the parent directory and install the built package:
Add a udev rule to manage device permissions:
Create a new group and add your user to it:
Reboot your Pi:
Download the latest version of Codeproject.AI server: RPi64 version
Start the docker container and set it to run on boot
Open the web interface of the newly set up CodeProject.AI server:
You should now show "Started Multi-TPU (TF-Lite)" and can send AI requests |
@MidnightLink awesome work! That's great to see it's been validated on the Pi 5. I have also broken mine out earlier today, and it was able to recognize both TPUs, so I think we can mark this as fixed/working, and if anyone has issues or further questions, feel free to add them here! |
@MidnightLink - I just ran through your instructions on a fresh Pi OS 12 install, and it worked like a charm, thanks! Follow-up question: Any idea if the CodeProject.AI Server will be adding support for the Hailo-8 / Hailo-8L? |
@geerlingguy Funny enough I actually just posted in their forum asking the same exact question after seeing your latest video :) They do support adding third party modules already, but I'm hoping that they'll be able to get something integrated natively soon since I also just ordered one of the new Hailo Pi kits. There's a pretty detailed write up listed in their docs on how to do so ( https://www.codeproject.com/ai/docs/devguide/module_examples/adding_new_modules.html ) but I haven't really had the need to add anything as of yet |
Pineboards offers a Hat AI! Dual Edge Coral TPU Bundle for Raspberry Pi 5, which unites a Dual Edge Coral TPU for AI/ML/inference to the Raspberry Pi 5, through a PCIe Switch to support both PCIe lanes for both TPUs.
Most other E-key PCIe HATs only support one PCIe lane, so if you installed a Dual Edge TPU, you would only have access to one of the two TPUs.
Pineboards also includes a Dual Edge TPU with this bundle, so you don't need to source your own from another vendor.
The text was updated successfully, but these errors were encountered: