Commit 73dc38ef authored by Peter Parente's avatar Peter Parente Committed by GitHub

Merge pull request #595 from whosford/docker-stacks-update-tensorflow-readme

Update tensorflow-notebook readme with distributed mode instructions
parents a995da5c f9c74a16
...@@ -17,9 +17,11 @@ docker run -it --rm -p 8888:8888 jupyter/tensorflow-notebook ...@@ -17,9 +17,11 @@ docker run -it --rm -p 8888:8888 jupyter/tensorflow-notebook
Take note of the authentication token included in the notebook startup log messages. Include it in the URL you visit to access the Notebook server or enter it in the Notebook login form. Take note of the authentication token included in the notebook startup log messages. Include it in the URL you visit to access the Notebook server or enter it in the Notebook login form.
## Tensorflow Single Machine Mode ## Tensorflow Machine Mode
As distributed tensorflow is still immature, we currently only provide the single machine mode. Tensorflow can use single machine, or distributed mode.
Single machine mode:
``` ```
import tensorflow as tf import tensorflow as tf
...@@ -33,6 +35,21 @@ sess.run(init) ...@@ -33,6 +35,21 @@ sess.run(init)
sess.run(hello) sess.run(hello)
``` ```
Distributed mode:
```
import tensorflow as tf
hello = tf.Variable('Hello Distributed World!')
server = tf.train.Server.create_local_server()
sess = tf.Session(server.target)
init = tf.global_variables_initializer()
sess.run(init)
sess.run(hello)
```
## Notebook Options ## Notebook Options
The Docker container executes a [`start-notebook.sh` script](../base-notebook/start-notebook.sh) script by default. The `start-notebook.sh` script handles the `NB_UID`, `NB_GID` and `GRANT_SUDO` features documented in the next section, and then executes the `jupyter notebook`. The Docker container executes a [`start-notebook.sh` script](../base-notebook/start-notebook.sh) script by default. The `start-notebook.sh` script handles the `NB_UID`, `NB_GID` and `GRANT_SUDO` features documented in the next section, and then executes the `jupyter notebook`.
...@@ -99,7 +116,7 @@ For additional information about using SSL, see the following: ...@@ -99,7 +116,7 @@ For additional information about using SSL, see the following:
## Conda Environments ## Conda Environments
The default Python 3.x [Conda environment](http://conda.pydata.org/docs/using/envs.html) resides in `/opt/conda`. The default Python 3.x [Conda environment](http://conda.pydata.org/docs/using/envs.html) resides in `/opt/conda`.
The commands `jupyter`, `ipython`, `python`, `pip`, and `conda` (among others) are available in both environments. For convenience, you can install packages into either environment regardless of what environment is currently active using commands like the following: The commands `jupyter`, `ipython`, `python`, `pip`, and `conda` (among others) are available in both environments. For convenience, you can install packages into either environment regardless of what environment is currently active using commands like the following:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment