Skip to content

Commit

Permalink
Add nbserverproxy doc (#144)
Browse files Browse the repository at this point in the history
Add nbserverproxy doc
  • Loading branch information
guillaumeeb committed Sep 6, 2018
1 parent bd46b2d commit 1f6db98
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ Once Jupyter is installed and configured, using a Jupyter notebook is done by:
$ ssh -N -L 8888:x.x.x.x:8888 username@hpc_domain
Now you can go to ``http://localhost:8888`` on your browser to access the
notebook server.

Viewing the Dask Dashboard
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -121,6 +124,45 @@ availaible below:
frameborder="0" allow="autoplay; encrypted-media"
allowfullscreen></iframe>

Dask Dashboard with Jupyter
~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are using dask-jobqueue within jupyter, one user friendly solution to
see the Dashboard is to use `nbserverproxy
<https://github.com/jupyterhub/nbserverproxy>`_. As Dashboard http end point is
launched inside the same node as jupyter, this is a great solution for viewing
it without having to do SSH tunneling. You just need to install
``nbserverproxy`` in the python env you use for launching the notebook, and
activate it as indicated in the docs:

.. code-block::
pip install nbserverproxy
jupyter serverextension enable --py nbserverproxy
Then, once started, the Dashboard will be accessible from your notebook URL
by just adding the path ``/proxy/8787/status``, replacing 8787 by any other
port you use or the Dashboard is bind to if needed. Sor for example:

- ``http://localhost:8888/proxy/8787/status`` with the example above
- ``http://myjupyterhub.org/user/username/proxy/8787/status`` if using
jupyterhub

Note that if using Jupyterhub, the service admin should deploy nbserverproxy
on the environment used for starting singleuser notebook, but each user may
have to activate the nbserverproxy extension.

Finally, you may want to update the Dashboard link that is displayed in the
notebook, shown from Cluster and Client objects. In order to do this, just
edit dask config file, either ``~/.config/dask/jobqueue.yaml`` or
``~/.config/dask/distributed.yaml``, and add the following:

.. code-block::
distributed.dashboard.link: "/proxy/{port}/status" # for user launched notebook
distributed.dashboard.link: "/user/{JUPYTERHUB_USER}/proxy/{port}/status" # for jupyterhub launched notebook
Configuration
-------------

Expand Down

0 comments on commit 1f6db98

Please sign in to comment.