uvicorn-gunicorn-docker icon indicating copy to clipboard operation
uvicorn-gunicorn-docker copied to clipboard

Wrong ML prediction inside the docker

Open laxmimerit opened this issue 3 years ago • 1 comments

Hi, I have trained distilbert model with ktrain and deployed it with this docker. I am getting a very weird result inside the docker. ml prediction is completely different from what I am getting out of this docker. I had also gone inside the docker with the docker shell. I loaded the model there and tested but the result was again wrong.

I don't understand how this could be possible? I am using this config inside and outside of the docker.

python 3.7
tensorflow 2.3
ktrain 0.25.2
transformers 4.3
pytorch 1.7

Any idea how this could be possible?

laxmimerit avatar Jul 02 '21 08:07 laxmimerit

There's no reason for what happens in the backend of the application layer to change regardless of containerization. In fact, containerization is there to prevent the "it works on my computer" problem.

There's a high chance the globally installed packages on your computer are influencing your build.

First, uninstall all your globally installed Python packages, then create a virtual env and make your project run there. Then you'll be use to use the Dockerfile in this project.

codespearhead avatar Mar 17 '24 14:03 codespearhead