C4W1 : Unable to run tensorflow serving

Trying to follow C4W1 github

Unable to run the docker command to start TFS. get the following error

No versions of servable half_plus_two found under base path /models/half_plus_two. Did you forget to name your leaf directory as a number (eg. '/1/')?

Hi @Amit_Srivastava, welcome to discourse! Can you provide the OS and shell that you are running this on? It looks like the the bind mount didn’t work as expected. Did you successfully cloned the serving repo in the /tmp/tfserving directory?

Hola Andrés @a-zarta, I got into the same problem presented by @Amit_Srivastava. I am working on Windows 10 and I’m using PowerShell in administrator mode. And yes, I did successfully cloned the serving repo in tmp/tfserving directory. See below an image of my docker general configuration, Settings WSL integration, and the screen with the error I got.
I would appreciate your comments.
Gracias, saludos

Hola Sergio!
To get the lab running please use a WSL2 shell instead of Powershell. You can type in the Windows search bar for wsl or bash and one of these shells should be available since you have WSL2 already installed.

Let me know if this works! :slight_smile:

1 Like

I was able to find a fix for my issue. I was using relative path in source=… I provided absoulte path and was able to run the command.

I’m glad you got it working!

Hi again,
I have completed the following steps:

  1. I just tried to run WSL at lower memory levels (~55%), however, WSL did close immediately. So problem of WSL instability was not related to high memory usage.
  2. Then: I did solve the problem with WSL closing immediately reviewing this link and running the following line in PowerShell: C:> wsl.exe --set-default Ubuntu.18-04
    However, I got an error message in WSL when trying to run the command to spin up a container to serve the model under TFS.
  3. I uninstalled and installed Docker again.
  4. Now WSL runs ok
  5. the command spins up a container (see screen 1)
  6. However, some error happens, and it enters in a loop asking for something (see screen 2)
  7. When tried to get an inference it got an error (see screen 3)
    I would appreciate your comments.
    Thanks in advance.

Hi Sergio! Have you tried Amit’s solution here? You need to check two things:

  1. Make sure that you have cloned the TF Serving repo under /tmp/tfserving as shown in the instructions.
  2. Use an absolute path for the source parameter when you do the docker run command

Hope this helps!

Thanks Chris.
I did clone the repo.
Regarding the second, I have not. I copied the command from the instructions. I will review it.

Great! One trick to make sure that you have the correct path is to navigate to the root directory where you cloned the repo and type the pwd command. It should return the current working directory. So if you cloned it under /mnt/tmp/tfserving instead, then the new source argument would be /mnt/tmp/tfserving/serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_two_cpu.

Thanks again I will follow your suggestions.
Best regards,

Hi Chris,
I just did check the path, and it seems ok. See the screenshot below.
However, the problem is still there. In the docker dashboard, the image appears running now. However, the same message appears, I mean as it shows in the previous screenshot.

Can you share the actual docker run command that you are executing, along with the pwd of the path from where you are executing.

Hi Amit,
Thanks for your message.
Sure, see the screenshot below.

  1. Not sure why there is a target=> in there.

  2. As per the error message, did you check for existence of saved_model.pb in …/testdata/saved_model_half_plus_two_cpu/00000123 ?


  1. ok, I will check
  2. Yes, I can see it in the screenshot below.
  3. I did run it again, and there is still an error (see below)
  4. I did run “docker inspect tensorflow/serving”, and I got some details (see below) about the ENV, not sure if it helps

Your path starting with /tmp seems to be in C:
Can you try source=/mnt/c/tmp/tfserving/xxxxxxxx

Done !!
Thanks a lot !!
Amit, how did you realize that?

Great to know. I had specified /mnt/c in my path, and i found that missing. The windows explorer you attached was helpful

I’m running into the same issues, using Docker on Windows 10.

What would be the path to use in source=?