简体   繁体   中英

Starting TensorFlow on Docker on Google Cloud

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 -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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM