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
util-docker,github: Move to Docker buildx multi-platform builds #1019
Draft
BobbyRBruce
wants to merge
12
commits into
gem5:develop
Choose a base branch
from
BobbyRBruce:utilize-multiple-platform
base: develop
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+347
−561
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BobbyRBruce
added
util-docker
Docker util files. That found in "utils/docker"
github
gem5 files necessary for GitHub integration. Found in ".github"
labels
Apr 14, 2024
BobbyRBruce
force-pushed
the
utilize-multiple-platform
branch
from
April 14, 2024 00:54
57eb71f
to
120a34f
Compare
BobbyRBruce
changed the title
util-docker,github: Migrates to Docker buildx multiplatform builds
util-docker,github: Move to Docker buildx multi-platform builds
Apr 14, 2024
BobbyRBruce
force-pushed
the
utilize-multiple-platform
branch
from
April 15, 2024 21:02
ef46534
to
fc34ebe
Compare
JSON is a much better supported format than HCL. Change-Id: Ieb82b8a5ff71f57502d926b9418274cbd5a1fe2a
As we wish to support multi-platform builds, docker-compose.yaml has been replaced in favor of docker-bake.json. Change-Id: I170ca43bcaca6412773df8f3748f324d2e8da823
This update informs the user how to build using `docker buildx`. Change-Id: I9f15379a9b309f51654aa542f59954639ff653e6
Change-Id: I4ffad85f291d00149f8f67192e453a9ee65e0240
This does not appear to be used and therefore should not be regularly rebuilt. The images already stored in the registry will remain available. Change-Id: Ie9e4dda82d32f4403b9e64a34aba540a5b885be9
This does not appear to be used by the project and therefore should not be regularly rebuilt and uploaded to our registry. Images already on the registry shall remain. Change-Id: I22c4ea5ced7428912eed2d2b5f0e1960702da5ea
Now 22.04 is compiled using buildx with multi-platform, we can reference this image directly and remove the need for duplication of the Dockerfile. Change-Id: Id6a8459bc0eedaea2ed94002ee9cbd812ee72b1f
* Ups the action versions where possible. * Improves the comments. * Corrects indentation. * bake-action Action references "docker-bake.json" instead of "docker-bake.hcl". * artifact downloaded to "downloaded-dockerfiles" dir. Change-Id: I21b304637856f2faa213b56be12634b339b7576c
BobbyRBruce
force-pushed
the
utilize-multiple-platform
branch
from
April 15, 2024 21:02
fc34ebe
to
bee9901
Compare
It doesn't make much sense to have these build to ARM or RISC-V platforms.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
github
gem5 files necessary for GitHub integration. Found in ".github"
util-docker
Docker util files. That found in "utils/docker"
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR sets up multi-platform docker images for the gem5 project. In short, multi-platform docker images are docker images built for multiple platforms. Previously all our docker images were compiled to the "linux/amd64" platform (X86). If these docker images were run on another host, the Docker engine emulated the X86 platform, at considerably performance cost. With this PR the images are built to "linux/amd64", "linux/riscv64", and "linux/arm64". When the
docker pull
command is run, docker will automatically obtain the right build from the registry (e.g., if running on an ARM host,docker pull
will obtain the image built to "linux/arm64").Multi-platform builds are built using
docker buildx
and the file used to specify buildx docker builds is called a bake file. This has been included in "util/dockerfiles/docker-bake.json". To avoid confusion, "util/dockerfiles/docker-compose.yaml" has been removed. "docker compose" is not the correct tool for building docker images and has poor support for multi-platform builds.While not yet fully tested, it should be possible to run the compilation of our docker images as part of a GitHub Actions job via the ".github/workflow/docker-build.yaml" workflow. This file has been updated in this PR with hopes incorporating it.
In addition, this PR removes the following Dockerfiles from "util/dockerfiles":
I could find no evidence these were presently being used. The docker images built thus far will still exist on the container registry indefinitely. Removing them from "util/dockerfiles" simply means they are not officially supported or built regularly. They can be re-added easily at a later date if needed.