简体   繁体   中英

How to run an amd64 docker images on arm64 host

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 2021-07-28 22:25:06.349222: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.

I am trying to run an amd64 image on arm64, I tried adding --platform Linux/amd64, but still the same issue.

Any workarounds?

If you want to build the image for amd64, change the default environment variable as below:

export DOCKER_DEFAULT_PLATFORM=linux/amd64
docker build -t mytag:myver .

Then you can inspect to verify the architecture:

docker image inspect mytag:myver | grep -i Architecture

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM