Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose up : Cannot start service wsgiserver #9

Open
HazmilH opened this issue Aug 19, 2020 · 12 comments
Open

docker-compose up : Cannot start service wsgiserver #9

HazmilH opened this issue Aug 19, 2020 · 12 comments

Comments

@HazmilH
Copy link

HazmilH commented Aug 19, 2020

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.

@pplonski
Copy link
Owner

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

@HazmilH
Copy link
Author

HazmilH commented Aug 19, 2020

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

@pplonski
Copy link
Owner

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.

@HazmilH
Copy link
Author

HazmilH commented Aug 19, 2020

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

@pplonski
Copy link
Owner

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)?

@HazmilH
Copy link
Author

HazmilH commented Aug 20, 2020

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.

@HazmilH
Copy link
Author

HazmilH commented Aug 20, 2020

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

@pplonski
Copy link
Owner

pplonski commented Aug 20, 2020 via email

@HazmilH
Copy link
Author

HazmilH commented Aug 20, 2020

Please add /api/v1 to url

I did it, but it give me this :
image

@HazmilH
Copy link
Author

HazmilH commented Aug 20, 2020

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

image

@pplonski
Copy link
Owner

pplonski commented Aug 20, 2020 via email

@HazmilH
Copy link
Author

HazmilH commented Aug 20, 2020

Can you run docker ps?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants