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

Remove GOARCH in ray-operator/Dockfile to support multi-arch images #1442

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

ideal
Copy link
Contributor

@ideal ideal commented Sep 22, 2023

E.g. with docker buildx build --platform linux/amd64,linux/arm64/v8

Why are these changes needed?

To support different architectures with multi-arch docker images with docker buildx, we should remove GOARCH=amd64 in Dockerfile.

Related issue number

None.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

E.g. with docker buildx build --platform linux/amd64,linux/arm64/v8
Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

I am not familiar with buildx, and I haven't been able to find any documentation on removing GOARCH in ray-operator/Dockerfile to support multi-architecture images. Could you please share some relevant resources?

This PR is not that risky as my first thought. We use GitHub Actions to build images, and all GitHub-hosted runners are x86_64, so it is not that risky to remove the GOARCH option.

@ideal
Copy link
Contributor Author

ideal commented Sep 23, 2023

Hi, @kevin85421

Basically, with docker buildx, we can build single image which contains variants for different architectures. When running container with that image, Docker can automatically selects the image that matches the user's OS and architecture.

Some resources:

https://docs.docker.com/build/building/multi-platform/

https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

I need to clone your fork and test this PR on my own. Can you provide more details about how you manually test this PR and what's your environments?

ray-operator/Makefile Show resolved Hide resolved
@ideal
Copy link
Contributor Author

ideal commented Oct 12, 2023

@kevin85421 Could you please check this again?

@kevin85421 kevin85421 self-assigned this Oct 12, 2023
@kevin85421 kevin85421 merged commit f256ddd into ray-project:master Oct 13, 2023
21 of 22 checks passed
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