ufoym / deepo

Setup and customize deep learning environment in seconds.
http://ufoym.com/deepo
MIT License
6.32k stars 749 forks source link

Question about running an app #86

Closed mteckes closed 5 years ago

mteckes commented 5 years ago

Hello, I am new to Docker and Jupyter Notebook. I apologize for my noob question. I am trying to create a micro service for an assignment but I am having some trouble. I want to use open CV just to do some image processing (convert color image to B&W). I am just trying to use my machine as a server to provide the service. I uploaded my app, app.py to jupyter notebook and put it into a folder.

I spin up my docker machine with:

docker run -it -p 5000:5000 -p 8888:8888 -v ~/Macintosh\ HD/Users/myuser/Documents/DOCKER\ STUFF/:/root --ipc=host ufoym/deepo:all-py36-jupyter jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'

I get the following:

[I 20:05:59.066 NotebookApp] The Jupyter Notebook is running at: [I 20:05:59.066 NotebookApp] http://0.0.0.0:8888/

I then run in a different terminal window:

docker exec -t -i ContainerID /bin/bash

I do this so I can run the app from inside of the container and have access to all of the libraries. I change directories to find my app. I do cd root, then cd MicroServe, and then I can run python3.6 app.py and it says I have a server running.

Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

I have it so that if I go to the homepage, I should get a basic hello world. But when I navigate to http://127.0.0.1:5000/ I get an error with safari. If this worked, I was hoping that I could use Postman to test my micro service.

"Safari Can't Open this Page Safari can't open the page "127.0.0.1:5000" because the server unexpectedly dropped the connection. This sometimes occurs wn the server is busy. Wait for a few minutes, and then try again."

I have also tried many different port numbers with no luck.

I am not sure what I am doing wrong or how to fix my issue. Is what I am trying to do even possible?

Thank you very much for the help,

Mike

emican86 commented 5 years ago

The error message looks like a typo? "127.0.01:5000" try 127.0.0.1:5000.

On Tue, Feb 26, 2019, 3:47 PM mteckes <notifications@github.com wrote:

Hello, I am new to Docker and Jupyter Notebook. I apologize for my noob question. I am trying to create a micro service for an assignment but I am having some trouble. I want to use open CV just to do some image processing (convert color image to B&W). I am just trying to use my machine as a server to provide the service. I uploaded my app, app.py to jupyter notebook and put it into a folder.

I spin up my docker machine with:

docker run -it -p 5000:5000 -p 8888:8888 -v ~/Macintosh\ HD/Users/myuser/Documents/DOCKER\ STUFF/:/root --ipc=host ufoym/deepo:all-py36-jupyter jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'

I get the following:

[I 20:05:59.066 NotebookApp] The Jupyter Notebook is running at: [I 20:05:59.066 NotebookApp] http://0.0.0.0:8888/

I then run in a different terminal window:

docker exec -t -i ContainerID /bin/bash

I do this so I can run the app from inside of the container and have access to all of the libraries. I change directories to find my app. I do cd root, then cd MicroServe, and then I can run python3.6 app.py and it says I have a server running.

Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

I have it so that if I go to the homepage, I should get a basic hello world. But when I navigate to http://127.0.0.1:5000/ I get an error with safari. If this worked, I was hoping that I could use Postman to test my micro service.

"Safari Can't Open this Page Safari can't open the page "127.0.01:5000" because the server unexpectedly dropped the connection. This sometimes occurs wn the server is busy. Wait for a few minutes, and then try again."

I have also tried many different port numbers with no luck.

I am not sure what I am doing wrong or how to fix my issue. Is what I am trying to do even possible?

Thank you very much for the help,

Mike

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ufoym/deepo/issues/86, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9DhjPW5ZzwrBzf0J_OiHjJgXPdrUMtks5vRZ1tgaJpZM4bTFjK .

ufoym commented 5 years ago

The provided details are not enough to identify the problem. We think the url is wrong, try http://`your server ip`:5000