@@ -18,33 +18,49 @@ limitations under the License.
1818Tutorials, which are implemented as Jupyter Notebooks for easy consumption and editing,
1919are provided under the ` notebooks ` directory.
2020
21- To run one of the tutorials, start a Jupyter session in the ` notebooks ` directory.
22- ``` bash
23- cd notebooks
24- jupyter notebook
25- ```
2621
27- If you are running the notebooks from within a virtual environment (recommended), you may create a kernel
28- attached to the environment as follows:
22+ Assuming you are running the notebooks from within a virtual environment (recommended), you may follow the steps
23+ below to prepare and launch your notebooks:
24+
25+ <ol >
26+ <li > Create a kernel attached to the environment:
2927
3028``` bash
3129python -m ipykernel install --user --name your_env --display-name " Python (your_env)" .
3230```
3331
34- This kernel should then be available for you under the "Kernel > Change kernel" menu item. If a notebook displays
35- TensorBoard and you are running it from a remote server, you may forward the port that TensorBoard uses (by default 6006)
36- to your local machine:
32+ This kernel should then be available for you under the "Kernel > Change kernel" menu item.</li >
33+
34+ <li > If a notebook displays TensorBoard and you are running it from a remote server, you may forward the
35+ port that TensorBoard uses (by default 6006) to your local machine:
3736
3837``` bash
3938ssh -N -f -L localhost:6006:localhost:6006 user@remote_ip_address
4039```
4140
42- Additionally, some notebooks may make use of the [ ipywidgets] ( https://github.com/jupyter-widgets/ipywidgets ) package.
43- You may need to enable the Jupyter extension to properly see the UIs.
44- Use the following command to do so: ` jupyter nbextension enable --py widgetsnbextension ` .
45- If Jupyter was already running, restart after running the command.
41+ ** Tip:** If the port is unavailable, you may look for the process using it with ` sudo lsof -i :6006 ` and release it with
42+ ` kill -9 <PROCESS_ID> ` . The above binding command also allows you to view TensorBoard outside your notebook by going to
43+ ` localhost:6006 ` from your local machine.</li >
44+
45+ <li > Some notebooks may make use of the [ipywidgets](https://github.com/jupyter-widgets/ipywidgets) package.
46+ You may need to enable the Jupyter extension to properly see the UIs with the following command:
47+
48+ ``` bash
49+ jupyter nbextension enable --py widgetsnbextension.
50+ ```
51+ </li >
52+
53+ <li > Start a Jupyter session in the `notebooks` directory, optionally using an available port of your choice (e.g., 8890):
54+
55+ ``` bash
56+ cd notebooks
57+ jupyter notebook --port=8890
58+ ```
59+
60+ Again, if you are running the Jupyter server from a remote server, you may bind the notebook port as you did with TensorBoard, then
61+ view it from your local machine with ` localhost:8890 ` .</li >
62+ </ol >
4663
47- Once the Jupyter session has started, you can open the desired notebooks.
4864Note, the TensorFlow V1 notebooks are tested with TensorFlow version ~ = 1.15.0.
4965For best results, confirm your system matches that version.
5066
0 commit comments