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

Update to JLab 3 #217

Merged
merged 8 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ dependencies:
- dask=2.20.0
- dask-image=0.2.0
- dask-ml=1.6.0
- dask-labextension=2.0.2
- jupyterlab=2.1
- nodejs=16
- dask-labextension>=5.2.0
- jupyterlab>=3
Comment on lines -10 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces some conflicts with #218, so this should be merged first then I can fix that one.

- numba
- numpy=1.21
- pip
Expand All @@ -19,7 +18,6 @@ dependencies:
- seaborn
- scikit-learn=0.23
- matplotlib
- nbserverproxy
- nomkl
- h5py
- xarray
Expand Down
1 change: 1 addition & 0 deletions binder/example.jupyterlab-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"split-area","orientation":"horizontal","sizes":[0.5,0.5],"children":[{"type":"tab-area","currentIndex":0,"widgets":["markdownviewer-widget:Welcome.md"]},{"type":"split-area","orientation":"vertical","sizes":[0.5,0.5],"children":[{"type":"tab-area","currentIndex":0,"widgets":["dask-dashboard-launcher:/individual-task-stream"]},{"type":"tab-area","currentIndex":0,"widgets":["dask-dashboard-launcher:/individual-progress"]}]}]},"current":"markdownviewer-widget:Welcome.md"},"down":{"size":0,"widgets":[]},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","jp-property-inspector","running-sessions","dask-dashboard-launcher","@jupyterlab/toc:plugin","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":["debugger-sidebar"]},"relativeSizes":[0.16362230919765167,0.8363776908023483,0]},"file-browser-filebrowser:cwd":{"path":""},"workspace-ui:lastSave":"/default.jupyterlab-workspace","markdownviewer-widget:Welcome.md":{"data":{"path":"Welcome.md","factory":"Markdown Preview"}},"dask-dashboard-launcher:/individual-task-stream":{"data":{"route":"/individual-task-stream","label":"Task Stream","key":"Task Stream"}},"dask-dashboard-launcher:/individual-progress":{"data":{"route":"/individual-progress","label":"Progress","key":"Progress"}},"dask-dashboard-launcher":{"url":"DASK_DASHBOARD_URL","cluster":""}},"metadata":{"id":"default","last_modified":"2021-12-20T20:41:35.169956+00:00","created":"2021-12-20T20:41:35.169956+00:00"}}
94 changes: 0 additions & 94 deletions binder/jupyterlab-workspace.json

This file was deleted.

5 changes: 0 additions & 5 deletions binder/postBuild

This file was deleted.

8 changes: 6 additions & 2 deletions binder/start
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash

# Replace DASK_DASHBOARD_URL with the proxy location
sed -i -e "s|DASK_DASHBOARD_URL|${JUPYTERHUB_BASE_URL}user/${JUPYTERHUB_USER}/proxy/8787|g" binder/jupyterlab-workspace.json
sed -i -e "s|DASK_DASHBOARD_URL|${JUPYTERHUB_BASE_URL}user/${JUPYTERHUB_USER}/proxy/8787|g" binder/example.jupyterlab-workspace

# TODO: Importing of workspace via CLI is currently broken.
# remove this workaround once https://github.com/jupyterlab/jupyterlab/issues/10805 is resolved
mkdir -p ~/.jupyter/lab/workspaces/
mv binder/example.jupyterlab-workspace ~/.jupyter/lab/workspaces/default-37a8.jupyterlab-workspace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 37a8 part of this path seems quite specific. Why is that part needed?

Suggested change
mv binder/example.jupyterlab-workspace ~/.jupyter/lab/workspaces/default-37a8.jupyterlab-workspace
mv binder/example.jupyterlab-workspace ~/.jupyter/lab/workspaces/default-37a8.jupyterlab-workspace

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 100% a hack -- that's a hash based on the workspace name which is not guaranteed to be stable. But I think it might be okay for the time-being, and is better than the currently broken state.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha -- totally fine with me if it works

# Import the workspace
jupyter lab workspaces import binder/jupyterlab-workspace.json
# jupyter lab workspaces import binder/example.jupyterlab-workspace

exec "$@"