[英]Starting TensorFlow on Docker on Google Cloud
I followed the directions to install TensorFlow on Docker on Google Cloud here : 我按照指示在Google Cloud上的Docker上安装TensorFlow:
http://tensorflow.org/get_started/os_setup.html#docker-based-installation http://tensorflow.org/get_started/os_setup.html#docker-based-installation
The first time, it did work and showed the tensorflow prompt. 第一次,它确实工作并显示了tensorflow提示。 Now that I have logged out and back in, I get this: 现在我已经退出并重新登录,我得到了这个:
technologiclee@docker-playground:~$ docker run -it b.gcr.io/tensorflow/tensorflow root@2e87064f0743:/#
I also tried this: 我也试过这个:
root@2e87064f0743:/# docker run b.gcr.io/tensorflow/tensorflow-full bash: docker: command not found
Is there a different way to start TensorFlow on Docker after it is installed? 安装后在Docker上启动TensorFlow有不同的方法吗?
The docker run -it
command brings up a bash shell in a container where TensorFlow is installed. docker run -it
命令在安装了TensorFlow的容器中调出bash shell。 Once you are at the root@2e87064f0743:/#
prompt you can start an interactive TensorFlow session by starting ipython
as the following example shows: 进入root@2e87064f0743:/#
提示符后,您可以通过启动ipython
启动交互式TensorFlow会话,如以下示例所示:
$ 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.