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

查看:283
本文介绍了无法使用gpu和docker在Google云端平台上打开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 cloud平台仅开放一个端口用于docker部署,即8080

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

因此,如果您要打开docker jupyter笔记本,则应使用以下方法:

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在Google云端平台上打开jupyter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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