Build TensorFlow environment using Docker
docker run -it -p 8888:8888 --name tensorflow gcr.io/tensorflow/tensorflow
Connect to container
docker exec -it tensorflow /bin/bash
Required package installation
apt-get update
apt-get install -y vim wget
Hello World output with reference to Tutorial
#python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>> quit
Recommended Posts