mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-16 14:32:57 +00:00
Update tensorflow readme with distributed mode instructions
This commit is contained in:
@@ -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.
|
||||
|
||||
## 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
|
||||
@@ -33,6 +35,21 @@ sess.run(init)
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
## 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:
|
||||
|
||||
|
Reference in New Issue
Block a user