How to run TensorFlow in Windows

NOTE: As of 11/29/2016, TensofFlow adds support for Windows. Check here for the announcement. Please check here for installation.
NOTE: v0.12.0 RC0 has an issue with TensorBoard. Until RC1 is released, you better use a latest nightbuild here.

TensorFlow is one of the hottest machine learning libraries but there is no Windows build yet! Workarounds are known to be 1) running Linux VM, 2) using Docker, or 3) trying out Bash on Windows 10.

I tried out Bash on Windows 10 but it did not work for me, but Docker worked very well. I would like to record the steps that I followed here:

First, install Docker for Windows.

Run Docker image containing TensorFlow (found here):

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

That’s it!

Open localhost:8888 to see jupyter :)

Since I also wanted to run python interpreter from the shell, I ran the following Docker command in another command prompt:

>docker exec -i -t 0207597f6c84 /bin/bash
root@0207597f6c84:/notebooks# python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello

where 0207597f6c84 was the ID of the container that I had launched earlier. I could get this ID using Docker ps command:

>docker ps
CONTAINER ID IMAGE COMMAND CREATED 0207597f6c84 5547120ff897 "/run_jupyter.sh" 40 seconds ago

Alternatively, I could run Docker without running jupyter:

>docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow /bin/bash
root@1db6de60a2e1:/notebooks# cd ..
root@1db6de60a2e1:/# ./run_jupyter.sh &
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.