uvicorn-gunicorn-docker
uvicorn-gunicorn-docker copied to clipboard
Wrong ML prediction inside the docker
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?
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.