无法使用 gpu 和 docker 在谷歌云平台上打开 jupyter [英] can't open jupyter on google cloud platform with gpu and docker

查看:23
本文介绍了无法使用 gpu 和 docker 在谷歌云平台上打开 jupyter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用以下命令打开 jupyter:

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

但是当我用外部IP地址打开它时,我无法连接并且系统说:

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

我已经建立了外部IP地址并建立了防火墙.

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 

并且以下测试已粘贴:

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

如何解决这个问题?

推荐答案

经过一个月的调试,终于,终于,终于,终于,终于,终于,终于,终于,终于,终于,终于,终于我喜欢这个答案:

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

google云平台只开放了一个docker部署端口,即8080

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

所以如果你想打开docker jupyter notebook,你应该使用下面的方法:

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

关注8080:8888

pay attention to 8080:8888

这篇关于无法使用 gpu 和 docker 在谷歌云平台上打开 jupyter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆