C4_W1_Lab_2_TFS_Docker error in docker run command

When creating a post, please add:

When I try to run this command:

docker run --rm -p 8501:8501 \
 --mount type=bind,\
target=/models/half_plus_two \
 -e MODEL_NAME=half_plus_two -t tensorflow/serving &
[1] 85563

I get this unexpected error:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
/usr/bin/tf_serving_entrypoint.sh: line 3:    12 Illegal instruction     tensorflow_model_server --port=8500 --rest_api_port=8501 --model_name=${MODEL_NAME} --model_base_path=${MODEL_BASE_PATH}/${MODEL_NAME} "$@"

[1]  + exit 132   docker run --rm -p 8501:8501 --mount  -e MODEL_NAME=half_plus_two -t 

How do I fix this?

The command you’ve shared works on linux. Please share the following details:

  1. Did you clone the repository to /tmp?
  2. OS / hardware used for this lab
  3. Output of
docker pull tensorflow/serving

Thanks. Does this lab require linux, rather than other environments?

  1. Yes, I did the clone the repo to /tmp
  2. I have a MacBook Air with a Apple M1 running macOS 13.0.1 (22A400)
  3. The output of
docker pull tensorflow/serving

is this:

$ docker pull tensorflow/serving
Using default tag: latest
latest: Pulling from tensorflow/serving
Digest: [I deleted this before posting]
Status: Image is up to date for tensorflow/serving:latest

What's Next?
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview tensorflow/serving


tensorflow/serving image is public. There’ no need for logging into you docker account.

I’ve asked other mentors / staff with access to M1 Mac to help you out.

I have not tried to log in to my Docker account. This is just what is printed out to the console when I enter the command you asked me to enter:

docker pull tensorflow/serving

You don’t need to log into your docker account to pull a public image. Please wait for staff / other mentor(s) to reply.

Hi Tom. Please check if any of the solutions here work for you:

The first two look simpler. Hope this helps.