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

Add arm64 Support #83

Merged
merged 3 commits into from
Jul 5, 2023
Merged

Add arm64 Support #83

merged 3 commits into from
Jul 5, 2023

Conversation

BytesGuy
Copy link
Contributor

@BytesGuy BytesGuy commented Jul 3, 2023

Adds initial support for arm64

  • Builds node variants with the correct architecture
  • If arm64=1 is added to the image manifest file, the gen-dockerfiles.sh script will default to create buildx commands

Note: Right now browser variants are skipped for arm64 due to issues with Selenium server. This will be addressed later

@BytesGuy BytesGuy requested a review from a team as a code owner July 3, 2023 22:25
@BytesGuy BytesGuy enabled auto-merge (squash) July 3, 2023 22:28
Copy link
Contributor

@ryanbourdais ryanbourdais left a comment

Choose a reason for hiding this comment

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

LGTM

@BytesGuy BytesGuy merged commit 1505e71 into main Jul 5, 2023
@BytesGuy BytesGuy deleted the arm64-support branch July 5, 2023 15:46
BytesGuy added a commit to CircleCI-Public/cimg-node that referenced this pull request Jul 10, 2023
# Description
Add arm64 support to the cimg/node image by using buildx to build multi
arch images.

The majority of the work actually lives in the cimg-shared repo which is
where the build commands are generated:

CircleCI-Public/cimg-shared#83
CircleCI-Public/cimg-shared#84

The main change to the Dockerfile here is an architecture check and
switch to the `USER` directive. `sudo` in buildx builds generally causes
errors when running Docker on linux.

See also changes to cimg-orb:

https://github.com/CircleCI-Public/cimg-orb/pull/51

Note: The browsers variant does not build for arm64, only amd64, due to
a limitation with selenium server. We will address this in the future,
once arm64 support is rolled out to the majority of images

Test build with buildx:
https://app.circleci.com/pipelines/github/CircleCI-Public/cimg-node/1419/workflows/daea85da-b14a-479b-adc9-d9c358135e16/jobs/1486

# Reasons
To build multi architecture images and allow cimg/node to run on arm64
natively

# Checklist

Please check through the following before opening your PR. Thank you!

- [x] I have made changes to the `Dockerfile.template` file only
- [x] I have not made any manual changes to automatically generated
files
- [x] My PR follows best practices as described in the [contributing
guidelines](CONTRIBUTING)
- [x] (Optional, but recommended) My commits are
[signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
BytesGuy added a commit to CircleCI-Public/cimg-python that referenced this pull request Jul 11, 2023
# Description
Add arm64 support to the cimg/python image by using buildx to build
multi arch images.

The majority of the work actually lives in the cimg-shared repo which is
where the build commands are generated:

CircleCI-Public/cimg-shared#83
CircleCI-Public/cimg-shared#84
CircleCI-Public/cimg-shared#85

The main change to the Dockerfile here is the switch to the `USER`
directive. `sudo` in buildx builds generally causes errors when running
Docker on linux.

See also changes to cimg-orb:

https://github.com/CircleCI-Public/cimg-orb/pull/51

**Notes for Python:**

The builds with buildx are _super slow_, so I am not 100% happy with the
current build workflow for this image in particular. Ideally we need to
split this into building on native platforms and combine the manifest,
but for now this current solution may work.

---

Note: The browsers variant does not build for arm64, only amd64, due to
a limitation with selenium server. We will address this in the future,
once arm64 support is rolled out to the majority of images

Test build with buildx:
https://app.circleci.com/pipelines/github/CircleCI-Public/cimg-python/569/workflows/8cde5db1-d47b-47f1-ba7c-13b343a1879d

# Reasons
To build multi architecture images and allow cimg/python to run on arm64
natively

# Checklist

Please check through the following before opening your PR. Thank you!

- [x] I have made changes to the `Dockerfile.template` file only
- [x] I have not made any manual changes to automatically generated
files
- [x] My PR follows best practices as described in the [contributing
guidelines](CONTRIBUTING)
- [x] (Optional, but recommended) My commits are
[signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants