This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 693
Fail to generate ARM64 compliant docker image from Linux/aarch64 container #2207
Comments
Having the same issue, was this resolved? |
I ended up launching linux docker container (aarch64 cpu) from my macbook M1, and use it for running bazel.
The crossbuild package for ubuntu worked for me. In my .bazelrc,
Then use this command to cross-compile to x86_64 compatible binary |
The gcc_suite toolchain config was done manually. I'm not 100% sure if I did it correctly though.
|
Any workaround or fix that does not include running Bazel in a container? |
What @kpark-hrp said |
My workaround.
This worked for me. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐞 bug report
Affected Rule
The issue is caused by the rule: py_imageIs this a regression?
I cannot tell.Description
My Macbook M1 has a linux (aarch64 platform) docker container that has all of my project setup for bazel, and I do all development inside the container. Bazel py_image produced a tarball docker image file. Since it was built from the linux/aarch machine, I expected the tarball image to be aarch compliant. But its targeted platform is x86_64 (or amd64).
🔬 Minimal Reproduction
In WORKSPACE.bazel,
In BUILD.bazel,
Then run this command,
$ bazel build //batch/file_process:python_shell_simple_image.tar
Copy the tar file to host machine. In my case, Apple M1 macos' filesystem. Load the docker image.
$ docker load -i python_shell_simple_image.tar
Launch a new docker container.
docker run --rm -it bazel/batch/file_process:python_shell_simple_image
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_docker version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: