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

provide apt package, docker image for linux/arm64 hosts (18.1.0) #154

Open
sreuland opened this issue Nov 15, 2021 · 8 comments
Open

provide apt package, docker image for linux/arm64 hosts (18.1.0) #154

sreuland opened this issue Nov 15, 2021 · 8 comments

Comments

@sreuland
Copy link
Contributor

Description

Explain in detail the additional functionality you would like to see in stellar-core.

Provide linux/arm64 architecture builds of the apt package and the stellar-core docker images. currently there are only linux/amd64 versions provided.

Explain why this feature is important

For anyone running macbooks with the Apple silicon chips, which are on arm64 ISAs, when running stellar-core docker images, Docker splashes up Warning messages:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

the docker image does appear to still run afterwards though, but wanted to mention this warning output for visibility in case may accrue problems over time.

Also, can't build other Docker images locally that reference the stellar-core apt package from apt.stellar.org , during the Docker build output, after adding apt.stellar.org to apt, apt-get update it fails with:

N: Skipping acquire of configured file 'unstable/binary-arm64/Packages' as repository 'https://apt.stellar.org focal InRelease' doesn't support architecture 'arm64'
N: Skipping acquire of configured file 'stable/binary-arm64/Packages' as repository 'https://apt.stellar.org focal InRelease' doesn't support architecture 'arm64'

apt repo has linux/amd64 binaries, but the Dockerfile build for ubuntu base image is defaulting to host machine arch of linux/arm64, and not finding pkg.

Describe the solution you'd like

would. be convenience if linux/arm64 arch versions were provided for stellar-core docker image and apt pkg.

Describe alternatives you've considered

Maybe brief blurb in Documentation to say ignore WARNING: The requested image's platform does not match ... if running the docker image on newer Apple M1 macs.

@leighmcculloch
Copy link
Member

For anyone running macbooks with the Apple silicon chips

This would also make it possible to deploy to AWS Graviton instances on EC2.

@MonsieurNicolas MonsieurNicolas transferred this issue from stellar/stellar-core Nov 16, 2021
@ire-and-curses
Copy link
Member

What's involved in building for this additional target arch? I think we're going to see an increasing need for this as more developers move to the new Apple machines.

@leighmcculloch
Copy link
Member

leighmcculloch commented Feb 16, 2022

Adding support for arm64 would also allow us to ship a linux/arm64 version of quickstart which would make it easier for developers on Apple machines to run quickstart without needing to specify --platform linux/amd64 and, for developers not using Docker Desktop and not using a flavor of container runtime that has multi-arch setup by default, without needing to setup multi-arch docker support.

As a quick reference, stellar-core appears to build and run natively on Apple silicon, and it also appears to build and run natively inside Docker on linux/arm64. I tested the latter by building quickstart's Dockerfile.dev image on an Apple silicon and it worked.

@overcat
Copy link
Contributor

overcat commented Mar 25, 2022

I would love to see linux/amd64 binaries added, currently I'm working on Ubuntu 20.04.4 LTS aarch64 and quickstart seems to be unable to start successfully.

@leighmcculloch
Copy link
Member

leighmcculloch commented Mar 25, 2022

I would love to see linux/amd64 binaries added

@overcat Do you mean linux/arm64? linux/amd64 packages are already available.

@leighmcculloch
Copy link
Member

leighmcculloch commented Mar 25, 2022

I'm working on Ubuntu 20.04.4 LTS aarch64 and quickstart seems to be unable to start successfully

You should be able to run the linux/amd64 quickstart image using the --platform linux/amd64 option on the docker run command. This assumes your Ubuntu environment is setup to support emulation using something like qemu. A quick way to set up emulation inside your docker environment is to run this command:

docker run --rm --privileged aptman/qus -s -- -p

Note that this command will modify the host by loading qemu-user-static as the emulation binary to execute amd64 programs.

@overcat
Copy link
Contributor

overcat commented Mar 25, 2022

I would love to see linux/amd64 binaries added

@overcat Do you mean linux/arm64? linux/amd64 packages are already available.

Yes, linux arm64🙇

@leighmcculloch
Copy link
Member

leighmcculloch commented Jun 20, 2023

The impact of this issue is expanding as we're about to start shipping docker images of soroban-rpc that use debs, and they won't be usable (without emulation) on linux/arm64:

@jacekn jacekn added State / TRIAGE State / Issue needs to be triaged and removed State / TRIAGE State / Issue needs to be triaged labels Jun 21, 2023
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

No branches or pull requests

5 participants