无法在Windows

时间:2016-02-23 16:28:59

标签: docker tensorflow

希望我没有错过任何东西 我使用本指南在win 7上安装了docker:
https://docs.docker.com/engine/installation/
我打开一个新终端并输入以下命令:

docker run -it b.gcr.io/tensorflow/tensorflow

所有人都下载并提取,然后我接受以下按摩:

[I 16:09:55.069 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret 
[W 16:09:55.122 NotebookApp] WARNING: The notebook server is listening on all IP
 addresses and not using encryption. This is not recommended. 
[W 16:09:55.122 NotebookApp] WARNING: The notebook server is listening on all IP
 addresses and not using authentication. This is highly insecure and not recommended.
[I 16:09:55.134 NotebookApp] Serving notebooks from local directory: /notebooks 
[I 16:09:55.134 NotebookApp] 0 active kernels
[I 16:09:55.134 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/ 
[I 16:09:55.134 NotebookApp] Use Control-C to stop this server and shut down all
 kernels (twice to skip confirmation). 

然后它就像这样被卡住,没有命令行,我也无法输入任何东西......我错过了什么?

2 个答案:

答案 0 :(得分:9)

好的,所以我找到了一个答案,
有两种方法可以解决它:
1)改为使用源代码安装tensorflow,这似乎解决了这个问题。 这是通过写: docker run -it b.gcr.io/tensorflow/tensorflow:latest-devel
2)或者,如果您使用常规安装,则在安装检查之前 默认的VM IP:

docker-machine ip default

然后,在安装后进入brwoser http://(default_ip):8888/

答案 1 :(得分:9)

我遇到了同样的问题,并且能够按照以下步骤使其正常工作:

$ docker-machine ip default

在我的案例中记住这个DOCKER_IP值(复制到剪贴板)

192.168.99.100

现在启动你的TensorFlow docker容器(带端口转发):

$ docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow

现在打开网络浏览器:

$ open http://localhost:8888

您现在应该在浏览器中看到jupyter主页

我正在研究Getting started wtih TensorFlow here的更多笔记,其中一些是OSX特定的,但

更新:我现在有了更好的理解,所以我更新答案 - docker镜像使某些端口可用(EXPORTable)进行映射,但默认情况下,当容器为时,它们不会将它们映射到主机端口跑。

我们可以使用-p选项将它们映射到主机。我们指定在主机上应该将已导出的端口映射到哪个主机端口(如果有)。

$ docker run -p $HOSTPORT:$CONTAINERPORT someimage