Skip to content
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

Build wheels for Linux ARM64 #5511

Merged
merged 28 commits into from Mar 18, 2024
Merged

Build wheels for Linux ARM64 #5511

merged 28 commits into from Mar 18, 2024

Conversation

abey79
Copy link
Contributor

@abey79 abey79 commented Mar 14, 2024

What

Build linux-aarch64 wheels (with manylinux_2_31) and fixes the C and CLI builds to bring the min required glibc version to 2.31.

Note: cursory inspection indicates that the actual min glibc version 2.29. However, we don't formally test that. The only test is done by maturin on our wheels, against the manylinux_2_31 standard.

Amongst other things, this PR:

  • updates our ci docker image to be compatible with aarch64 (Include multi-platform dockerbuild with arm64 support #5543 – thanks @jleibs)
  • remove all instances of double GCS authentication (our setup-rust action auth to GCS, so an explicit auth isn't necessary, and would break cleanup in linux-arm/cli build workflow—why there only is unclear)
  • use it for all linux-aarch64 builds
  • fixes pixi.toml for linux-aarch64 compatibility
  • bumps pixi to 0.16.1 everywhere in the ci
  • adds a manual trigger for building wheels
  • (mostly) unifies the target naming scheme

Related

Further work

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that yaml sure looks like yaml to me!

.github/workflows/on_pull_request.yml Show resolved Hide resolved
.github/workflows/on_push_main.yml Outdated Show resolved Hide resolved
pixi.toml Show resolved Hide resolved
abey79 added a commit that referenced this pull request Mar 15, 2024
### What

I need that to test #5511

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{ pr.commit }}/docs)
<!--DOCS-PREVIEW-->
- [Examples preview](https://rerun.io/preview/{{ pr.commit }}/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
@abey79 abey79 marked this pull request as draft March 15, 2024 08:37
@abey79 abey79 marked this pull request as ready for review March 15, 2024 09:52
@abey79
Copy link
Contributor Author

abey79 commented Mar 15, 2024

Testing builds for all wheels with ca13fdc

https://github.com/rerun-io/rerun/actions/runs/8294337164
https://github.com/rerun-io/rerun/actions/runs/8294338708
https://github.com/rerun-io/rerun/actions/runs/8294341078
https://github.com/rerun-io/rerun/actions/runs/8294343144
https://github.com/rerun-io/rerun/actions/runs/8294345322

all ✅

❯ gcloud storage ls gs://rerun-builds/commit/ca13fdc/wheels/
gs://rerun-builds/commit/ca13fdc/wheels/rerun_sdk-0.15.0a2-cp38-abi3-macosx_10_12_x86_64.whl
gs://rerun-builds/commit/ca13fdc/wheels/rerun_sdk-0.15.0a2-cp38-abi3-macosx_11_0_arm64.whl
gs://rerun-builds/commit/ca13fdc/wheels/rerun_sdk-0.15.0a2-cp38-abi3-manylinux_2_31_x86_64.whl
gs://rerun-builds/commit/ca13fdc/wheels/rerun_sdk-0.15.0a2-cp38-abi3-manylinux_2_35_aarch64.whl
gs://rerun-builds/commit/ca13fdc/wheels/rerun_sdk-0.15.0a2-cp38-abi3-win_amd64.whl

Resulting linux-aarch64 wheel: http://build.rerun.io/commit/ca13fdc/wheels/rerun_sdk-0.15.0a2-cp38-abi3-manylinux_2_35_aarch64.whl

Works on a RPi 5 with glibc 3.36

@jleibs
Copy link
Member

jleibs commented Mar 15, 2024

Ok, as of #5543 rerunio/ci_docker:0.12.0 should be able to run on arm.

jleibs and others added 3 commits March 15, 2024 16:08
### What
 - Switch to using docker buildx to create the docker environment
- Update the platform-specific parts of the dockerfile to use the
targetplatform
 - Bump the version to 0.12 just in case something goes wrong.
 - Start using the docker container on buildjet

```
$ docker buildx imagetools inspect  rerunio/ci_docker:0.12.0
Name:      docker.io/rerunio/ci_docker:0.12.0
MediaType: application/vnd.oci.image.index.v1+json
Digest:    sha256:9575a44a30152ef292c8f73e9546f1d431ea32246bc7a0043ba51f4df936c537
           
Manifests: 
  Name:        docker.io/rerunio/ci_docker:0.12.0@sha256:7e0e5a31234578d10c53733e9e703972d73ac7df992323d95feb60700cb94e4b
  MediaType:   application/vnd.oci.image.manifest.v1+json
  Platform:    linux/arm64
               
  Name:        docker.io/rerunio/ci_docker:0.12.0@sha256:e1861e823b15b3accf103c00910fa24a89aa274f02550b5458524322cc1f39ce
  MediaType:   application/vnd.oci.image.manifest.v1+json
  Platform:    linux/amd64
```

Successful buildjet run:
https://github.com/rerun-io/rerun/actions/runs/8301499563/job/22721760001

![image](https://github.com/rerun-io/rerun/assets/3312232/8524e28e-8630-4c1e-a0e1-972e5a928487)


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5543/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5543/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5543/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5543)
- [Docs
preview](https://rerun.io/preview/3eb7524e2f955e97dcb423b6a16c10f7fdb75ba9/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/3eb7524e2f955e97dcb423b6a16c10f7fdb75ba9/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
@abey79 abey79 marked this pull request as draft March 16, 2024 07:15
@abey79
Copy link
Contributor Author

abey79 commented Mar 16, 2024

Back to draft... Using our shiny new docker image for the c build appears to work: https://github.com/rerun-io/rerun/actions/runs/8306070007/job/22733709381

The same isn't quite true yet for the CLI: https://github.com/rerun-io/rerun/actions/runs/8306071147/job/22733711751

@abey79
Copy link
Contributor Author

abey79 commented Mar 18, 2024

@abey79 abey79 merged commit be1fbcc into main Mar 18, 2024
64 checks passed
@abey79 abey79 deleted the antoine/wheels-linux-aarch64 branch March 18, 2024 13:22
@jprochazk jprochazk mentioned this pull request Mar 21, 2024
5 tasks
jprochazk added a commit that referenced this pull request Mar 21, 2024
### What

CI on main has not been running at all since
#5511

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{ pr.commit }}/docs)
<!--DOCS-PREVIEW-->
- [Examples preview](https://rerun.io/preview/{{ pr.commit }}/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Comment on lines +59 to 60
# TODO(#5525): at least this target is broken, maybe others — we currently only use linux-x64 and windows-x64
run: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What target is "this" referring to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

badly placed comment, it should be attached to the linux-arm64 arm. pretty sure the mac targets are broken as well, but i hadn't tested then iirc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip: next time don't use words like "this", but be specific instead. Comments have a tendency to jump around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use pixi to build on linux-aarch64 Publish all artifacts for Linux ARM
3 participants