-
Notifications
You must be signed in to change notification settings - Fork 92
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
bug: nix install script doesn't work in docker on m1 machines #962
Comments
Hey @Miaxos - we don't have any plans to build native ARM binaries right now, but you should be able to use the precompiled x86_64 binaries for your M1 machines since they come installed with Apple's Rosetta software which allows x86_64 code to be run just fine. Hope this helps! |
also i'm closing this as a duplicate of #260 |
Yeah, but in a docker context within M1 it's really troublesome to run your entire docker stack through rosetta. |
That would be troublesome, but I don't quite understand how this would be the outcome. Could you elaborate on how that would happen? (If you run |
Well, if you install rover inside your docker image which is running inside an M1, (if docker isn't running through rosetta, if it is, idk, it's not what I'm doing), you'll have your docker images built for aarch64 and not x86_64, to build x86_64 images you'll have to use
Dockerfile:
|
my guess is that the docker environment is a bit different than real m1 machines. usually, we have a few other things in flight at the moment so I'm not sure when this will be addressed but I'm going to reopen this and edit the issue title to reflect that the issue could be addressed by modifying our install script. for now, you could download the install script and modify the if you do end up getting the script fixed up we'd love to accept a PR |
I think the script is running correctly. $ uname -s
Linux
$ uname -m
aarch64 If you tried to override that in the script and run x86_64 binaries in there, the Linux in the VM wouldn't know what to do with it, because it doesn't have something like Rosetta. That would be like running an Intel Linux binary on a Raspberry Pi or a mobile phone. |
ahhh, thanks for the explainer there @mlkiefer, that makes a lot of sense. in that case i'm actually going to close this as a duplicate of #582 (which does seem to include some user-submitted Dockerfiles that may help you!) it seems like there have been increasing requests for arm64 binaries as of late, I can't make any promises as to if/when those binaries will be provided but do know that it's on our radar. |
Anyways, I need to get Rover v0.4.2 out today and don't feel confident that I can make the same change that Gary made in today's time frame regardless. We will revisit this. edit: as a workaround, you could try to download the x86_64 binaries directly from our github releases. i imagine it would work! |
It probably works for the x86_64 Mac binary in the native Mac environment but it won't work in the Linux VM that runs the docker container. |
The docker build problem isn't caused by the install script, but by trying to install amd64 rover into the aarch64 (ARM) docker image. From above:
By default, on an M1 machine, that will retrieve an aarch64(ARM) docker image and thus the install of rover will fail. If however, I have this Dockerfile:
(Note the specification of amd64, then all is well. Slow, but well) I changed CMD to entrypoint to avoid PATH type problems. Build as:
If I run the docker image this creates on my M1 laptop, then I get:
(You can get rid of the WARNING by specifying --platform=linux/amd64) |
Description
There is no precompiled binary for aarch64, which is troublesome when you are working with a M1, I think it would be useful to add it, there are more and more people working on this architecture.
Linked issue: #936 #260 #582
Thank you for this awesome crate :-)!
The text was updated successfully, but these errors were encountered: