-
Notifications
You must be signed in to change notification settings - Fork 11
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
Mac arm64 build for 7.7.x #11
Comments
In theory we could just add it here:
but are github actions available on macos/arm64? A cursory search suggests no. |
I saw the other day that support for GitHub-hosted Apple Silicon is in beta and is expected to go public in Q3 2023: github/roadmap#528 They have that conversation locked, probably because so many devs like me would bug them about it when it will be released. They've supported self-hosted M1 runners since August 2022. The OCP wheel build should support the GitHub-hosted M1 runner when it's available, but we either have to wait until Q3 2023, or somebody has to set up a self-hosted runner. |
Hmmm, wasn't aware of this dependency. |
@fungiboletus notes in CadQuery/OCP#108 (comment):
|
Thanks for the heads-up @akoen |
I tried to enable this runner, unfortunately GitHub does not have a free version for open source projects yet (and I don't know if they have plans to). See the comment here. |
@jmwright # size wheel
161081972 cadquery_ocp-7.7.1-cp310-cp310-macosx_11_0_arm64.whl
161082182 cadquery_ocp-7.7.1-cp311-cp311-macosx_11_0_arm64.whl
161087133 cadquery_ocp-7.7.1-cp39-cp39-macosx_11_0_arm64.whl I could contribute them, but don't know how my wheels could be integrated into your workflow. |
It's not a solution for this issue, but someone posted on the CadQuery repo that they were able to get CadQuery to run on an M1 Mac. CadQuery/cadquery#1434 |
There is no ETA for free However, if the Conda package is already being cross compiled to arm64, then surely it would be possible to convert that recipe to Pip and use it in this repo on an intel runner - right? I'd be happy to assist with this as I really need an easily-installable-with-pip Cadquery for my team. |
Here is the PR that added |
After trying a few different approaches, building locally ended up being the path of least resistance. I'd be happy to do this on a regular basis on my M1 Macbook and upload the wheels to PyPi if that'd be helpful? PR containing the build script here: #18 |
just curious if there is a plan to take @jeremiahrose up on his offer (#18), or if i should plan to work around this issue for the foreseeable future. |
I have Mac M1 wheels built, but I can't upload them to PyPI right now because of size limits. I can make them available via something like a Dropbox download if someone has the capability and interest to install them locally. |
Can we request a size limit increase from PyPI? I hear they do regularly grant them on a case by case basis. In the meantime I have uploaded
There are wheels for other Python versions as well |
I already requested a size increase but have not heard back. We've gotten one increase already. |
FYI: https://www.flyci.net [I'm not affiliated.] |
@jmwright Since vtk in the meantime has Mac arm wheels, I wonder if you could remove the vtk libraries from cadquery_ocp. Given the amount of wheels this might free up enough to add another wheel? |
Plus I would think about removing the Python 3.8 wheels. 3.9, 3.10, 3.11 and 3.12 should be sufficient in 2024 |
@bernhard-42 We started building and bundling VTK ourselves because the official VTK wheels were built against a libstdc++ that was so new only bleeding-edge distros could run them. If that is no longer an issue we can switch back to the official VTK wheels. Am I reading this article correctly that Python 3.8 goes EoL during 2024? |
I would say that build123d and cadquery are more domain specific languages than generic Python packages that one installs into old Python envs. If we look at the hassle every arm mac user has to go through at the moment, upgrading from Python 3.8 to 3.9 shouldn't be a big deal. But that of course are my 2 cent only. |
It's worth noting also that the latest macOS already ships with Python 3.9, so then no need to touch anything even. |
Related comment on the CadQuery repo about removing Python 3.8 support: CadQuery/cadquery#1498 (comment) |
FYI: f4c2498 |
great! Thank you. |
@jmwright @jeremiahrose You can try FlyCI's M1 and M2 runners. They are on average 2x faster and 2x cheaper than GitHub's AND we have a free tier for OSS projects (see below). Install Instructions
jobs:
ci:
- runs-on: macos-latest
+ runs-on: flyci-macos-large-latest-m1
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4 500 mins/month Free for Public ReposSince your repo is public, FlyCI offers 500 mins/month of free M1 runner usage with the Don't hesitate to contact us in case the free tier doesn't suit your needs or you experience any issues with the runners. Our team is here to support you! Best Regards, |
FYI, Apple Silicon runners are now available for free from GitHub for public repos. Blog post here: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/ I tested it and it is working great! Oh and thanks to barnaby for letting me know about it! |
Thanks for letting me know @jdegenstein Do you have an example of how you used it? I thought I followed the instructions in the blog post, but the GitHub Action is still building x86_64 wheels for me. |
Sure, here is my test run file https://github.com/jdegenstein/build123d/blob/GH_macARM64_onlyPlane/.github/workflows/test.yml |
@jmwright I was able to build cadquery-ocp on my fork for MacOS arm64. Long story short, the biggest issue was that conda was creating an "osx-64" env when what was needed was "osx-arm64". There are a number of other minor issues and cleanup but it should provide a starting point at least: https://github.com/jdegenstein/ocp-build-system/actions/runs/7747906519 I also published a cp310 wheel here: |
Thanks @jdegenstein . Would you like to do a PR to the main repo? That workflow file is not in use yet, and was added specifically for this purpose, so I can merge it and then do some cleanup. I may switch all the builds to the local build method eventually, but want to be sure to get MacOS ARM64 builds working first. |
Great work @jdegenstein 🚀 |
Thanks to @jdegenstein there are now MacOS ARM64 wheel builds in CI: https://github.com/CadQuery/ocp-build-system/actions/runs/7874432399 The wheel files will have to be renamed before uploading to PyPI, but that will have to wait until we get the project size increased there. Please test these wheels out and report back here if you have any problems. |
Awesome! It would be great if the newly built MacOS ARM64 wheels could be added to a release here on GH as well (that way they can be e.g. |
Awesome development! I can't wait to try this out! |
@jdegenstein I didn't think about users doing a |
The MacOS ARM64 wheels have been attached to the release here. It is possible to do a pip install of the wheels on that release by copying the URL for the file that matches your OS and Python version and then doing |
Any idea why that would not work?
|
You need to install the cadquery package as well. cadquery-ocp does not bundle CadQuery with it. It only has a version of OCP that was intended for use with cadquery. We can't make it simply "ocp" because that would cause a naming conflict on PyPI. |
Right, thanks for the clarification. It works fine on macOS arm64. Thanks for making these packages available! |
Thank you so much for adding Apple Silicon support. I used the workaround of installing the wheel manually and it's working perfectly. It looks like pypi increased the storage size to accomodate Apple Silicon builds (pypi/support#3631). Would it be possible to submit the wheels to pypi? |
Please download the correct wheel for your platform and Python version and do a test installation. Once these have been tested, I will publish them to PyPI. During the installation, cadquery-vtk will be downloaded from PyPI since it is no longer embedded inside the OCP wheel. https://github.com/CadQuery/ocp-build-system/releases/tag/7.7.2.1 |
MacOS ARM64 builds are available for 7.7.2.1 on PyPI now. |
Thank you. Unfortunately I can't test it since the arm build of macos is for version 14.0+ and I have 13.0. The intel build is for macos 13+, but I have arm - LOL
Python packaging for binary packages is simply a nightmare ... |
I 100% agree. |
@jmwright I was able to install cadquery-vtk and it worked perfectly on Win10 / py311. Thank you for the work on this! I guess I need to investigate if it is possible to build on MacOS14 (arm) for MacOS13 (arm). We are building on MacOS14 to ensure we get arm and not x86_64 (github's approach to this problem seems a little lacking in my opinion, but maybe there is another workaround). |
There was an issue with the VTK dependency that is causing this wheel not to work properly for certain use cases, so I am reopening this issue. |
According to CadQuery/cadquery#1236 (comment) OCP now can build arm64 libs for Mac as conda packages.
Will Mac arm64 be supported by the upcoming 7.7.x wheel too?
The text was updated successfully, but these errors were encountered: