Unable to start TensorFlow within Docker, on Windows
Hope I didn’t miss anything.
I’ve installed docker on my win 7 using this guide:
I opened a new terminal and entered the following command:
docker run -it b.gcr.io/tensorflow/tensorflow
All donwloaded and extracted and then I get the following massages:
[I 16:09:55.069 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret [W 16:09:55.122 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended. [W 16:09:55.122 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended. [I 16:09:55.134 NotebookApp] Serving notebooks from local directory: /notebooks [I 16:09:55.134 NotebookApp] 0 active kernels [I 16:09:55.134 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/ [I 16:09:55.134 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
And then it just gets stuck like this, there’s no command line and I can’t enter anything… what am I missing?
2 Solutions collect form web for “Unable to start TensorFlow within Docker, on Windows”
Ok, So i found a sort of an answer,
There are two ways to solve it:
1) Install tensorflow with source code instead, this seems to solve the problem.
This is done by writing:
docker run -it b.gcr.io/tensorflow/tensorflow:latest-devel
2) Or, if you use the regular install, before installing check
the default VM IP with:
docker-machine ip default
And then, after installtion go in the brwoser to http://(default_ip):8888/
I had the same problem and was able to get it working by following these steps:
$ docker-machine ip default
DOCKER_IP value (copy to clipboard) in my case
Now start your TensorFlow docker container (with port forwarding):
$ docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow
Now open the web browser:
$ open http://localhost:8888
You should now see your browser with the jupyter home page
I’m working on more notes on Getting started wtih TensorFlow here some of that is OSX specific though
Update: I have a better understanding now so I’m updating the answer – A docker image makes certain ports available (EXPORTable) for mapping, but by default does not map them to the host machines ports when the container is run.
We can map them to the host by using the -p option. We specify which host port (if any) the already EXPORTed port should be mapped to on the host.
$ docker run -p $HOSTPORT:$CONTAINERPORT someimage