-
Notifications
You must be signed in to change notification settings - Fork 867
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
Wheel support for linux aarch64 #366
Comments
There are some issues which need to be solved before I can provide any support for this issue. However, you can start by looking at |
Hi @skvark , I will start working on adding dockerfile and image for aarch64. Once it is done I will raise a PR the same. Thanks |
@odidev I managed to build the I'll try to make rest of the changes over weekend so we can see if OpenCV |
@skvark Presently opencv-python builds are running on travis.ci.org. And recently arm64-graviton2 was inrtoduced for on travis-ci.com which is faster and have better performance. Using arm64-graviton2 will require opencv-python builds to migrate on travis-ci.com. |
It should be fine to migrate to travis-ci.com but I'll have to test first that everything works there as expected. Unfortunately #376 took all my time this weekend so I'll look into this a bit later. |
@skvark Thanks for the quick response. Please let me know if I can help you in this activity. |
The migration to travis-ci.com has been now done: https://travis-ci.com/github/skvark/opencv-python I'll have to rebuild the |
@skvark Thanks for the migration to travis-ci.com. Please let me know if I can provide any help for rebuilding the aarch64 image/wheel . |
The aarch64 Cmake provided via This issue indicates that a broken wheel was removed from PyPI but the same issue is still present: scikit-build/cmake-python-distributions#96 |
Upstream issue: scikit-build/cmake-python-distributions#115 |
@skvark I'm working to improve arm64 support for python wheels, including this one. Once this cmake problem has been addressed, I'll be happy to assist you in getting your project to support arm64. |
@AWSjswinney Thanks! arm64 support should be quite straightforward to add after the |
I just ran across this issue. I seem to be hitting something a little different then what is reported with sci-kit. When I pip3 install opencv-python : pip3 install opencv-python Problem with the CMake installation, aborting build. CMake executable is cmakeERROR: Failed building wheel for opencv-python |
@tom-gall Just to confirm, are you using arm64?
I could be wrong, but to me it looks like a broken |
yes, native arm64 (ThunderX) running debian. Do we know what the number is it's returning? |
I don't have native arm64 system to test this, no idea what's the error code. Probably just segfaults as demonstrated here: scikit-build/cmake-python-distributions#115 When that issue has been fixed the build should start working on arm64 machines. |
Yes, I can confirm that the segfault is the problem that @tom-gall is running into. @skvark (shameless plug) AWS is offering one free t4g.micro for each account through the end of 2020. Watch out for the EBS charges, though. I'm not sure those are falling under the free tier. You can also get a 64 bit version of raspbian for the Raspberry Pi 3 or 4. |
@skvark The upstream issue has been solved by the looks of it. As a relatively new developer, what remaining problems need to be solved to ensure opencv-python is compatible with aarch64? |
I believe @skvark had solved most of the problems already in the branch, feat/aarch64. The only remaining problem is that the cmake wheel needs to be published by making a new release. |
I just posted a new pull request to bump the version number of the python-cmake-distributions to give them an opportunity to make a release and publish new wheels. |
Source builds should start working without any changes in here when the new Pre-built wheel support will require some testing such as are the Travis |
On 'pip3 install opencv-python-headless' I get on A64FX: Problem with the CMake installation, aborting build. CMake executable is cmakeERROR: Failed building wheel for opencv-python-headless Happy to assist and try out new releases. |
It looks like the PR for the python cmake side of the equation hasn't landed yet ? |
Yes, please follow the |
For the impatient you can manually build the cmake wheel using (tested): pip install scikit-build
pip wheel --wheel-dir=/tmp/wheelhouse git+https://github.com/AWSjswinney/cmake-python-distributions@fbbbefa51c4046ef17190eec0265b93c46523033 The version will be wrong, so maybe something like (untested): pip install scikit-build
git clone https://github.com/AWSjswinney/cmake-python-distributions /tmp/cmake-python-distributions
cd cmake-python-distributions; git checkout fbbbefa51c4046ef17190eec0265b93c46523033
git tag 3.18.4
pip wheel --wheel-dir=/tmp/wheelhouse . |
Update:
Original postThis may not be overly helpful, as I did not write down exactly how, but I did manage to compile a wheel for Python3.9 AARCH64.
Hopefully it all builds correctly.
And that was what worked for me. This isn't a solution to the problem, more of a workaround if anyone desperately needs to build a wheel for |
@skvark, now cmake AArch64 wheel is available on pypi. Thanks. |
Yes, all the changes required in this repository are already in the master branch and builds are working fine. Unfortunately I can't do any releases until this issue has been addressed: pypi/support#712 |
Works now. Thanks. |
is this just pending a new tag at this point? |
It's pending multiple things (I have tests builds ongoing to see if macOS builds can be completed in time without the cache stage): #415 (comment) Travis in general is a huge issue. If I manage to fit a new release to the remaining trial credits I have in Travis, then there might be a small chance to get a new release with |
Ugh, sorry. i didn't realize TravisCI knee-capped everyone. I could probably kick in a few bucks to buy CI time which would buy time to find and build against an alternate CI provider. |
Yeah, Travis did not notify me about the change at all. Found out about it a few days ago via Hackernews. The macOS builds seem to be working now. It looks like I might get 4.5.0 wheels out, but not sure if there are enough credits to run the 3.4.12 builds after that. |
TravisCI has been trying to crack down on abuse, but it's my understanding that they are still offering legitimate projects the credits they need. See https://blog.travis-ci.com/oss-announcement. I'll also ask them directly for help for your project. |
@AWSjswinney Thanks! Yes, they might provide some free quota for open source projects. However, I'm not interested in sending monthly / weekly emails to them and asking for more credits (this project is going to need a lot of them). I'll see how this goes forward. |
It seems we have a final confirmation that Travis has stopped all OSS credit allocations: https://twitter.com/james_hilliard/status/1336081776691843072 Sorry, |
Can you use Github Actions? |
Maybe. However, my estimation is that the migration work takes at minimum 2 weeks of my time and the free quota on Github Actions is not enough for this project. The builds need to be optimized and split into multiple CI providers. Windows is fine since it runs in Appveoyr. A separate issue for the migration: #422 I'm taking at least this month off from this project. I'll get back to this in January. |
Your credit allocation issue has been fixed. Please recheck you should see 400,000 allocated credits. Sorry for the confusion! |
As I understand it, Github Actions are free for public projects. The 2000 free minutes are for private repositories. I am taking this from https://github.com/pricing and https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions:
|
@shabbir-github Thanks! @zwn Nice, Github Actions is ok then if there are no time limits for public projects. |
Managed to get one release out with the remaining Travis credits (builds are still running). |
OpenCV-Python 4.5.1 includes aarch64 package. I tested basic things with Jetson NANO and it works well. |
@asmorkalov I tried installing and using opencv-python on TX1 machine. It looks working fine for me. Please see the below attached screenshot rendered by a sample program. $ pip --version |
Summary
Installing opencv-python on aarch64 via pip using command "pip3 install opencv-python" throws error: No matching distribution found for opencv-python
Problem description
opencv-python doesn't have wheel for aarch64 on PyPI repository. So, while installing opencv-python via pip on aarch64, it throws an error " No matching distribution found for opencv-python".
Expected Output
Pip should be able to download opencv-python wheel from PyPI repository.
@opencv-pythonl-team, please let me know if I can help you building wheel/uploading to PyPI repository. I am curious to make opencv-pythonl wheel available for aarch64. It will be a great opportunity for me to work with you.
The text was updated successfully, but these errors were encountered: