I’m currently using the-littlest-jupyter-hub (tljh; The Littlest JupyterHub — The Littlest JupyterHub v0.1 documentation) as a simple way to lauanch/use jupyter lab on AWS EC2.
I’m using a plugin for configuration of tljh (tljh-plugin/tljh_plugin.py at main · raybellwaves/tljh-plugin · GitHub) and slowly expanding it to include more steps rather that manual steps after jupyterhub is launched.
One thing I would like to do is seamless get the dask dashboard working on launching.
There are a couple of manual options to do this which I made a note of in the dask docs (e.g. create config yaml file (Configuration — Dask documentation) or an environmental variable (Configuration — Dask documentation)).
I believe the approach I would like to do is go down the yaml file route and create a default yaml like
distributed:
dashboard:
# Locate the dashboard if working on a Jupyter Hub server
link: /user/${JUPYTERHUB_USER}/proxy/8787/status
When a user logs in this file is copied to /home/JUPYTERHUB_USER and JUPYTERHUB_USER is replaced with the JUPYTERHUB_USER environmental variable value.
For example, I log in and my username is ray (jupyter-ray) and have a file ~/.config/dask/dask.yaml which looks like
distributed:
dashboard:
# Locate the dashboard if working on a Jupyter Hub server
link: /user/jupyter-ray/proxy/8787/status
I can then see a link to the dashboard after doing
from dask.distributed import Client, LocalCluster
cluster = LocalCluster(local_directory="/tmp")
client = Client(cluster)
client
I don’t know enough sysadmin stuff where I think I could provision this i.e. write a skeleton file which is later filled in for the yaml approach
If it is easier I could provision an environmental variable as export DASK_DISTRIBUTED__DASHBOARD__LINK="/user/${JUPYTERHUB_USER}/proxy/8787/status"
I image I would drop the code in (tljh-plugin/tljh_plugin.py at main · raybellwaves/tljh-plugin · GitHub)
Relevant resources: