在Google Cloud上的Docker上启动TensorFlow [英] Starting TensorFlow on Docker on Google Cloud
问题描述
我按照方向在Google Cloud上的Docker上安装TensorFlow:
I followed the directions to install TensorFlow on Docker on Google Cloud here :
http://tensorflow.org/get_started/os_setup.html#docker-based-installation
第一次,它工作并显示张量流提示。
现在我已经退出并返回,我得到这个:
The first time, it did work and showed the tensorflow prompt. Now that I have logged out and back in, I get this:
technologiclee @ docker-playground:〜$ docker run - 它b.gcr.io/tensorflow/tensorflow
root @ 2e87064f0743:/#
我也尝试过:
root @ 2e87064f0743:/#docker run b.gcr.io/tensorflow/tensorflow-full
bash:docker:command not found code>
root@2e87064f0743:/# docker run b.gcr.io/tensorflow/tensorflow-full
bash: docker: command not found
在安装了Docker之后,是否有一种不同的启动TensorFlow的方法?
Is there a different way to start TensorFlow on Docker after it is installed?
推荐答案
docker run -it
命令在安装TensorFlow的容器中显示一个bash shell。一旦你进入 root @ 2e87064f0743:/#
提示你可以启动一个交互式TensorFlow会话,开始 ipython
以下示例显示:
The docker run -it
command brings up a bash shell in a container where TensorFlow is installed. Once you are at the root@2e87064f0743:/#
prompt you can start an interactive TensorFlow session by starting ipython
as the following example shows:
$ docker run -it b.gcr.io/tensorflow/tensorflow
root@2e87064f0743:/# ipython
Python 2.7.6 ...
In [1]: import tensorflow as tf
In [2]: c = tf.constant(5.0)
In [3]: sess = tf.InteractiveSession()
I tensorflow/core/...
In [4]: c.eval()
Out[4]: 5.0
这篇关于在Google Cloud上的Docker上启动TensorFlow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!