depthai-core icon indicating copy to clipboard operation
depthai-core copied to clipboard

depthai builds failing for armv61 (raspberry pi zero). Last successful build was 2.13

Open bgro82 opened this issue 3 years ago • 6 comments

Raspberry pi zero builds of depthai (armv61) last successfully built with 2.13 (about 7-8 months ago). Will it not be supported for future builds or is there some other reason for this? This surfaced for me as I'm trying to use a oak-d-pro (the IR light requires depthai 2.15 or above) with a rpi zero for testing

bgro82 avatar Jul 21 '22 03:07 bgro82

Great question. Will have to check with the team. I'm not immediately sure what we use as the runner for the Pi Zero. Will circle back.

Luxonis-Brandon avatar Jul 21 '22 03:07 Luxonis-Brandon

@bgro82 Will be addressed in the upcoming 2.17.2 release. Thanks!

themarpe avatar Jul 25 '22 13:07 themarpe

@themarpe Thank you! I just checked for the new release (https://www.piwheels.org/project/depthai/) and looks like it still didn't build.

bgro82 avatar Jul 27 '22 19:07 bgro82

@bgro82 sorry for the issue - looks like we'll have to add our own runners to cover this case...

themarpe avatar Jul 28 '22 12:07 themarpe

@themarpe thanks, do you know when this will be fixed?

bgro82 avatar Aug 22 '22 00:08 bgro82

@bgro82 unfortunatelly piwheels builds still have issues with latest release.

We'll likely have to run this on our own runners - currently we only build for ARMv7. Preferably we'd build for ARMv6 on a stronger RPi4B, but we've yet to implement this.

Any pointers are appreciated!

themarpe avatar Aug 28 '22 12:08 themarpe

@themarpe any ideas on what may be still causing the builds to fail? I primarily bought these cameras to use with the rpi zero but can't use a recent version of depthai (which causes other dependency issues, etc)

after some more reading, is it possible that 32 bit support was removed or disabled in some way?

also after more reading, it appears the architecture is armv6l (not armv61).

bgro82 avatar Jan 28 '23 20:01 bgro82

@bgro82

Yeah, the armv6 builds aren't available at the moment. The issue is also that building natively on the Pi Zero isn't easy due to limited amounts of RAM.

I'll see about spinning up a crossbuild this weekend.

themarpe avatar Feb 01 '23 12:02 themarpe

great thank you. Is it possible to use more disk swapping to make up for the low RAM (understanding it would be much slower)?

bgro82 avatar Feb 08 '23 04:02 bgro82

@bgro82 yes it would be possible. In my limited testing i did, i haven't been able to setup a proper cross compilation setup for it, but if you opt for swap, you should be able to compile it as intended

themarpe avatar Feb 10 '23 00:02 themarpe

I increased my swap file to 1024M (default on the pi zero is 100M) and was able to build this successfully when including "--no-dependencies". If there is somewhere I can share the wheel file let me know and happy to post it to save others the build time.

bgro82 avatar Feb 20 '23 21:02 bgro82

If there is somewhere I can share the wheel file let me know and happy to post it to save others the build time.

That'd actually be great - did you compile 2.20.2? Feel free to share here / link to it.

themarpe avatar Feb 21 '23 14:02 themarpe

sure thing. Here are the latest depthai and opencv builds for armv6l for raspbian bullseye and python 3.9:

depthai-2.20.2.0-cp39-cp39-linux_armv6l.whl: https://drive.google.com/file/d/1HWVVFAy7eKKuxEpd1KGq2tl71bJR4kKQ/view?usp=sharing opencv_python-4.7.0.68-cp39-cp39-linux_armv6l.whl: https://drive.google.com/file/d/1SONV5cnrZV05fSqLexs-MDXxZyJch0x_/view?usp=sharing

bgro82 avatar Feb 21 '23 15:02 bgro82

Thanks @bgro82 - checked and available over at: https://artifacts.luxonis.com/artifactory/luxonis-python-release-local/

The below command should work as expected

python3 -m pip install --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-release-local/ depthai

themarpe avatar Feb 21 '23 18:02 themarpe

Excellent, thank you. Happy to build these and provide from time to time as well if they are useful to others.

bgro82 avatar Feb 24 '23 01:02 bgro82

Hi @bgro82 @themarpe,

it would be great if you could build and provide armv6l wheels for the latest depthai release (v2.22.0.0). This would enable users of Raspberry Pi Zero W (v1) to use the latest features.

Thank you!

maxsitt avatar Jun 18 '23 16:06 maxsitt

@maxsitt

Do you mind doing the following:

  • Download https://artifacts.luxonis.com/artifactory/luxonis-python-release-local/depthai/depthai-2.22.0.0-cp39-cp39-linux_armv7l.whl (bullseye) or https://artifacts.luxonis.com/artifactory/luxonis-python-release-local/depthai/depthai-2.22.0.0-cp37-cp37m-linux_armv7l.whl (buster)
  • rename from linux_armv7l to linux_armv6l
  • python3 -m pip install [wheel]

If that works, I'll add this as part of our releases (cross checked, our runners build with march=armv6 already, so I think this should be ifne)

themarpe avatar Jun 20 '23 12:06 themarpe

Thanks @themarpe !

Everything works fine on RPi Zero W with RPi OS Bullseye and renaming the armv7l wheel (cp39) to armv6l.

After you added the (renamed) armv6l wheel it will be possible to install the depthai package on RPi Zero W with a simple python3 -m pip install depthai? Or do we still have to add --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-release-local/ ?

maxsitt avatar Jun 20 '23 18:06 maxsitt

After you added the (renamed) armv6l wheel it will be possible to install the depthai package on RPi Zero W with a simple python3 -m pip install depthai? Or do we still have to add --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-release-local/ ?

According to some pypi discussion, it doesn't allow uploading both armv6l and armv7l wheels, but I'll give that a go. Otherwise, it'll be available under our releases. We'll update the docs accordingly.

And thanks for giving this a go!

themarpe avatar Jun 20 '23 23:06 themarpe

@maxsitt (CC: @Erol444 ) These were successfully uploaded to pypi.

https://pypi.org/project/depthai/#files

@maxsitt If you don't mind giving this ago, that'd be great.

I'll mainline this for all further releases, such that no special handling will be required for RPi devices anymore 👍

themarpe avatar Jun 21 '23 00:06 themarpe

Thanks a lot @themarpe !

When running python3 -m pip install depthai==2.22.0.0 on RPi Zero W, depthai-2.22.0.0-cp39-cp39-linux_armv7l.linux_armv6l.whl is downloaded and successfully installed. Everything I tested works perfectly (custom scripts with YOLOv5n model detection & tracking).

maxsitt avatar Jun 21 '23 08:06 maxsitt

Closing as addressed now:)

themarpe avatar Jul 27 '23 13:07 themarpe