-
Notifications
You must be signed in to change notification settings - Fork 54
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
Create build for linux/arm64 platform to support Apple Silicon (M1, M2) #81
Comments
Hey @benjaminsingleton, if you clone the aarch64 branch and build your own image locally, it should resolve this problem. I've successfully built and started my ibgateway using this method. Although, I'm currently having trouble connecting to it from within my api.
|
indeed aarch64 was an attempt to get this working on arm64/aarch64. if you build localy ib-gateway using that branch, it should (kind of) work. there is no working GUI, but the API works. I have not fully tested the API, so i can't warranty anything. the main problem is to get a working java environment for ibgateway/TWS. aarch64 branch is not too far way, but not there yet. any help to get this working on arm64 is more than welcome. |
@wesget182 , aarch64 is using an outdated "latest" version. updating latest/Dockerfile IB_GATEWAY_VERSION to latest version might help. if this fix your issue please let me know. i can update the branch. I have not included this branch on the "master" branch because i don't consider it stable. |
Ahh actually I got everything working just fine. There were some internal issues with my code combined with my confusion regarding the |
Thanks for the pointer @wesget182 @gnzsnz! I was able to successfully build the image, run ib-gateway, and execute trades on my paper trading account. I wouldn't consider this super thorough testing, but it seems like it works as you'd expect. It would be great if you'd consider incorporating this in the |
@benjaminsingleton i'm not planning to merge aarch64 into I welcome any pull request to improve it's current status, I have made some progress but not enough to merge this into I would like to have:
|
Solution Overview: Port Mapping Adjustment: Platform Specification in Docker Compose: Adding platform: linux/amd64 to the docker-compose.yml file ensured the container consistently ran in linux/amd64 mode, improving stability on Apple Silicon. Updated Image Version: Switching to the latest image (ghcr.io/gnzsnz/ib-gateway:latest) also helped as it provided additional compatibility updates. VNC Configuration: We configured a VNC viewer to connect to the IB Gateway, allowing interaction with its GUI through port 5900. All incoming requests to IB Gateway worked as expected. Code Example: Here’s the modified docker-compose.yml section: services: These changes allowed the container to run smoothly on Apple Silicon (M1/M2) Macs, enabling full functionality of IB Gateway. Credit for a friend of my @ohadch |
@Amir-Inbar thanks for sharing this. i believe that you are not running the image in aarch64 architecture, but emulating amd64. which is fine but will not work on other aarch64 architectures like raspi or linux running on M1. what branch #102 is trying to do is to build an image in aarch64 architecture. |
@gnzsnz any recommended solutions to get this working on arm64 machines like AWS gravitron instances? Would you consider trying to rebuild the docker image using arm64 or using an emulator like qemu to translate instructions at the architecture level? |
Add this to your docker compose and it should work.
|
are you locally building off the aarch64 branch? your suggestion on the main branch does not work |
Is your feature request related to a problem? Please describe
There isn't a build that is compatible with modern Apple computers, which run on the platform
linux/arm64
.On my MacBook M2, I get odd errors when trying to run the image if I force pull it as a
linux/amd64
. The emulator that tries to runamd64
does not seem to be able to run ib-gateway.Describe the solution you'd like
A build that supports
linux/arm64
.Describe alternatives you've considered
Tried to run as
linux/amd64
but it didn't work.Docker Desktop 4.27.2 (137060).
Docker version 25.0.3, build 4debf41
The text was updated successfully, but these errors were encountered: