pplonski / my_ml_service

My Machine Learning Web Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-compose up : Cannot start service wsgiserver

HazmilH opened this issue · comments

Hi. Thank you for this excellent tutorial.
I'm having a problem after running "sudo docker-compose up".
Only "my_ml_deploy_nginx_1" image is running while the second image (my_ml_deploy_wsgiserver_1) have error as below


Starting my_ml_deploy_nginx_1 ... done
Starting my_ml_deploy_wsgiserver_1 ... error

ERROR: for my_ml_deploy_wsgiserver_1 Cannot start service wsgiserver: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "/app/docker/backend/wsgi-entrypoint.sh": permission denied": unknown

ERROR: for wsgiserver Cannot start service wsgiserver: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "/app/docker/backend/wsgi-entrypoint.sh": permission denied": unknown
ERROR: Encountered errors while bringing up the project.

Even after changing the /docker/backend/wsgi-entrypoint.sh permission, I still get this kind of error.

How can I fix this ?
Thank you in advance.

commented

Probably you need to add execute permission on wsgi-entrypoint.sh. Try with chmod +x wsgi-entrypoint.sh

Probably you need to add execute permission on wsgi-entrypoint.sh. Try with chmod +x wsgi-entrypoint.sh

Even after changing the /docker/backend/wsgi-entrypoint.sh permission, I still get this kind of error.

image

commented

You need to clean up the docker build and build once again (you are almost there!). Please make sure that there are good permissions in the docker. You can add

RUN ls -al /app/docker/backend

in the docker/backedn/Dockerfile in the last line (just to check).

Please let me know what permissions it will list.

You need to clean up the docker build and build once again (you are almost there!). Please make sure that there are good permissions in the docker. You can add

RUN ls -al /app/docker/backend

in the docker/backedn/Dockerfile in the last line (just to check).

Please let me know what permissions it will list.

This time it works.
image

But i'm getting this when running the server
image

commented

Great!

You have a strange exception when starting (no module sklearn.preprocessing._label). Are you able to fix it?

I understand, that you are able to run a server locally (without docker)?

Great!

You have a strange exception when starting (no module sklearn.preprocessing._label). Are you able to fix it?

I understand, that you are able to run a server locally (without docker)?

Yes. I can run it locally.

image
image

as for module sklearn.preprocessing._label , I will try to change sklearn version to see if it's work.

I changed the content of requirements.txt, from scikit-learn==0.21.3 to scikit-learn>=0.22.0

image

and still having this problem :
image

commented

Please add /api/v1 to url

I did it, but it give me this :
image

Its working now if, I change http://0.0.0.0:8000/api/v1/ to http://127.0.0.1:8000/api/v1/

image

commented

Can you run docker ps?

image