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

Auto layout jupyterlab workspace #5

Open
TomAugspurger opened this issue Apr 23, 2020 · 6 comments
Open

Auto layout jupyterlab workspace #5

TomAugspurger opened this issue Apr 23, 2020 · 6 comments

Comments

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Apr 23, 2020

In some setups (like dask-examples), we set up a jupyterlab workspace with the dask dashboard already open. Once a Client is created, the dashboard automatically lights up.

Do we want the same here?

I think it would involve copying a file like https://github.com/dask/dask-examples/blob/master/binder/jupyterlab-workspace.json and a start like https://github.com/dask/dask-examples/blob/master/binder/start.

@scottyhq this repo is using the pangeo/pangeo-notebook docker image. Can you confirm that if this repo had a binder/start, it wouldn't actually get executed? In order to do that we would need to change https://github.com/pangeo-data/pangeo-docker-images/tree/master/pangeo-notebook?

cc @cgentemann who raised this question in Gitter.

@scottyhq
Copy link
Contributor

scottyhq commented Apr 23, 2020

@TomAugspurger and @rabernat - It just occurred to me that it's pretty straightforward to add postBuild and start commands to any of the notebook images (what is hard is adding conda packages), but you can do this:

FROM pangeo/pangeo-notebook:2020.04.22

# Override start script (/srv/start)
COPY binder/start binder/jupyterlab-workspace.json /srv/

You have to change a few paths in the start scripts you pointed to. I just tried it out and this gets you most of the way there I think: https://github.com/scottyhq/pangeodev-binder/tree/master/binder

@cgentemann
Copy link

@TomAugspurger yes, this is basically what I would love. When running tutorials, having people have to copy the dask URL, then open up windows takes up a bit of time & results in a lot of confusion. So, having it automatically linked & some dask windows up already is ideal. Thanks.

@TomAugspurger
Copy link
Contributor Author

I'm embarrassed I didn't think to just add those lines to the Dockerfile :)

So now the question is: where should this live? I don't think it's appropriate for the pange-notebook docker image, since those are used on hubs which will persist the user's layout from their last session.

It makes sense for binder since they don't have persistent users. So I think I'll add it here.

@rabernat
Copy link
Contributor

After almost exactly a year, I am reviving this issue. 😁

It is not clear to me how to extend this binder environment. In my case, I wanted to add RISE to the environment. Here is my Dockerfile:

FROM pangeo/pangeo-notebook:2021.04.26
RUN mamba install -c conda-forge RISE

It didn't work. The mamba installation didn't go into the right location. There has to be some way to extend pangeo-notebook (rather than rebuilding everything on top of base-notebook). What can I try?

@scottyhq
Copy link
Contributor

@rabernat this gets confusing b/c conda path initialization, so add a flag (-n notebook) to make sure things get installed into the correct environment:

FROM pangeo/pangeo-notebook:2021.04.26
RUN echo $(which mamba)
RUN mamba install -n notebook -c conda-forge rise

also for what it's worth the Docker build output just changed for new versions on a mac. I had to dig around a bit for a more informative output via : docker build . -t pangeo/rise:latest --progress=plain --no-cache

@rabernat
Copy link
Contributor

Thanks @scottyhq! It worked!

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

4 participants