Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dask proxy to labextension.yaml #253

Open
lsterzinger opened this issue Oct 5, 2021 · 5 comments
Open

Add dask proxy to labextension.yaml #253

lsterzinger opened this issue Oct 5, 2021 · 5 comments

Comments

@lsterzinger
Copy link
Contributor

It'd be nice if the pangeo notebook dask-labextension knew to use the /proxy/localhost:8787 option by default, since as @scottyhq mentioned in Gitter it's probably more common to be running a LocalCluster rather than a GatewayCluster.

Right now, I'm able to append:

distributed:
  dashboard:
    link: "/proxy/localhost:8787"

To ~/.config/dask/labextension.yaml view the line:

RUN echo 'distributed:\n  dashboard:\n    link: "/proxy/localhost:8787"' >> /home/jovyan/.config/dask/distributed.yaml

in my Dockerfile, and confirmed it worked in pangeo binder. I can open a PR to add this to one of Pangeo dockerfiles, but I'm not sure which one. base-image?

@scottyhq
Copy link
Member

scottyhq commented Oct 5, 2021

Thanks @lsterzinger , let's wait on a pull request because i think there might be a few approaches.

Ideally, the reported dashboard url would be functional for both a LocalCluster and GatewayCluster. So instead of overriding the global dashboard config link, we'd only want to do this for LocalClusters. @TomAugspurger seems Dashboard: http://127.0.0.1:8787/status is also reported for LocalClusters on the Planetary Computer hub, do you have a recommended way to change that to /proxy/localhost:8787?

Screen Shot 2021-10-05 at 11 42 40 AM

@scottyhq
Copy link
Member

scottyhq commented Oct 6, 2021

@consideRatio @ian-r-rose there seem to be a lot of related issues discussed over in the dask-labextension repository (e.g. dask/dask-labextension#41) but i'm not tacking down a relevant per-cluster config for the dashboard URL ?

@TomAugspurger
Copy link
Member

It seems to me like setting distributed.dashboard.link to "/user/{JUPYTERHUB_USER}/proxy/{port}/status" does the trick, for both LocalCluster and dask Gateway based clusters.

image

So maybe it's OK to just change that setting? I'm not sure how the dask-gateway URL is determined, but it doesn't seem to be harmed by setting it.

@lsterzinger
Copy link
Contributor Author

Is setting that parameter from within the notebook the same as writing to the config file like I did during the docker image build stage?

@TomAugspurger
Copy link
Member

Setting it in the notebook was just for illustration, but yes, it's equivalent.

IMO, this shouldn't be set here in pangeo-docker-images. I think it should be set wherever the image is being used (e.g. https://github.com/pangeo-data/pangeo-cloud-federation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants