Project-MONAI / Project-MONAI/monai-deploy-app-sdk
[BUG] Cannot run MAP Docker images on M1 Mac silicon (arm64)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 138
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Hi all. I am a (relatively new) M1 Mac user – the arm64 architecture is the source of various development issues.
I am following the Getting Started instructions in monai-deploy-app-sdk/README.md.
I can successfully run monai-deploy package to create the MAP Docker image, however I cannot launch the app, i.e.: monai-deploy run
Steps/Code to reproduce bug
When I run monai-deploy run simple_app:latest input output I get the following:
Reading MONAI App Package manifest...
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Expected behavior
I expected this to happen tbh – have observed similar issues when building other Docker images. To get around this issue in other projects, I've used the --platform option when running docker build which can be used to set architecture compatibility. e.g.:
docker build --platform linux/amd64 .
I started looking into the monai-deploy code – would it be possible to update the monai-deploy package command with an option to pass --platform?
Environment details (please complete the following information)
- OS/Platform: macOS 12.0.1 (Monterey) – M1 cpu
- Python Version: 3.9.7
- Method of MONAI Deploy App SDK install: [pip, conda, Docker, or from source] conda using the repo requirements.txt
- SDK Version: pip version installed as of yesterday
Additional context
Thanks!
I've also tried using a Rosetta2 terminal (which is supposed to emulate an Intel CPU architecture) as well, but no luck so far.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Getting Started instructions in monai-deploy-app-sdk/README.md and trace the monai-deploy package and monai-deploy run entry points. Check how the Docker image is built and launched, then verify on an M1 Mac that the requested platform can be selected and the simple_app:latest example starts successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100