简体   繁体   中英

can't open jupyter on google cloud platform with gpu and docker

I wanted to use following command to open jupyter:

docker run --runtime=nvidia --name tensorflow1 -it -p 8888:8888 -p 6006:6006 tensorflow/tensorflow:latest-gpu-py3-jupyter

I can't open it with browser. The systerm looks good because it says:

To access the notebook, open this file in a browser:
    file:///root/.local/share/jupyter/runtime/nbserver-8-open.html
Or copy and paste one of these URLs:
    http://(568ebbf84a86 or 127.0.0.1):8888/?token=17fc57d57c89f56c460748f464b488c59f8ddccf5793e7

But when I open it with external ip address, I can't connect and system says:

[W 06:15:52.336 NotebookApp] 404 GET http://110.249.212.46/testget?q=23333&port=8888 (110.249.212.46) 38.11ms referer=None

I have built external ip address and built firewall.

There is no problem if I use the following command:

docker run --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu 

and following test has pasted:

python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"

how to solve this problem?

After one month debug, finally,finally,finally,finally,finally,finally,finally,finally,finally,finally,finally,finally I fond the answer:

google cloud platform only open one port for docker deployment which is 8080

so if you want to open docker jupyter notebook, you should use the following method:

docker run  --runtime=nvidia --name tensorflow1 -it  -p 8080:8888 tensorflow/tensorflow:latest-gpu-py3-jupyter

pay attention to 8080:8888

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM