datamachines / cuda_tensorflow_opencv

DockerFile with GPU support for TensorFlow and OpenCV
Apache License 2.0
120 stars 17 forks source link

Unable to EXPOSE port #1

Closed OkenKhuman closed 4 years ago

OkenKhuman commented 4 years ago

after running the image with cudnn I run the command "jupyter-notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root" but I am not able to open the notebook on crome. Please help me out.

mmartial commented 4 years ago

The tool was built without exposing any port on purpose. Not knowing what end-users will need, we decided not to expose any port by default.

For your use case, try to build the following Dockerfile (adapt the FROM to whichever container you require):

FROM datamachines/tensorflow_opencv:2.1.0_4.3.0-20200423

EXPOSE 8888

CMD jupyter-notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root

using docker build --tag jupnb:local . then you can run docker run --rm -it -p 8888:8888 jupnb:local and you should be given a URL to go to (with a token) to access on http://127.0.0.1:8888/ in your browser. I tried the above and was given the page in Chrome.

Note the -it is not required but it will allow you to Ctrl+C your container if needed (instead of docker kill-ing it)

I will extend the README.md to mention this.

mmartial commented 4 years ago

Confirming README.md updated with instructions. Moving this to closed.