Skip to content

[BUG] Cannot run MAP Docker images on M1 Mac silicon (arm64) #210

Open
@tomaroberts

Description

@tomaroberts

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

Full output here

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions