diff --git a/binder/environment.yml b/binder/environment.yml index 77293f6c..3dca71cf 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -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 - numba - numpy=1.21 - pip @@ -19,7 +18,6 @@ dependencies: - seaborn - scikit-learn=0.23 - matplotlib - - nbserverproxy - nomkl - h5py - xarray diff --git a/binder/example.jupyterlab-workspace b/binder/example.jupyterlab-workspace new file mode 100644 index 00000000..a5f6ccb4 --- /dev/null +++ b/binder/example.jupyterlab-workspace @@ -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"}} diff --git a/binder/jupyterlab-workspace.json b/binder/jupyterlab-workspace.json deleted file mode 100644 index 235914fd..00000000 --- a/binder/jupyterlab-workspace.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "data": { - "file-browser-filebrowser:cwd": { - "path": "" - }, - "dask-dashboard-launcher:individual-progress": { - "data": { - "route": "individual-progress", - "label": "Progress" - } - }, - "dask-dashboard-launcher:individual-task-stream": { - "data": { - "route": "individual-task-stream", - "label": "Task Stream" - } - }, - "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.67, - 0.33 - ], - "children": [ - { - "type": "tab-area", - "currentIndex": 0, - "widgets": [ - "dask-dashboard-launcher:individual-task-stream" - ] - }, - { - "type": "tab-area", - "currentIndex": 0, - "widgets": [ - "dask-dashboard-launcher:individual-progress" - ] - } - ] - } - ] - }, - "mode": "multiple-document", - "current": "markdownviewer-widget:Welcome.md" - }, - "left": { - "collapsed": false, - "current": "filebrowser", - "widgets": [ - "filebrowser", - "running-sessions", - "dask-dashboard-launcher", - "command-palette", - "tab-manager" - ] - }, - "right": { - "collapsed": true, - "widgets": [] - } - }, - "markdownviewer-widget:Welcome.md": { - "data": { - "path": "Welcome.md", - "factory": "Markdown Preview" - } - }, - "dask-dashboard-launcher": { - "url": "DASK_DASHBOARD_URL", - "cluster": "" - } - }, - "metadata": { - "id": "/lab" - } -} diff --git a/binder/postBuild b/binder/postBuild deleted file mode 100755 index 8329dbaa..00000000 --- a/binder/postBuild +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -# Install the JupyterLab dask-labextension -# TODO: Unpin dask-labextension version once extensions have been made compatibility updates -jupyter labextension install dask-labextension diff --git a/binder/start b/binder/start index ed8d530f..e0ca9912 100644 --- a/binder/start +++ b/binder/start @@ -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 # Import the workspace -jupyter lab workspaces import binder/jupyterlab-workspace.json +# jupyter lab workspaces import binder/example.jupyterlab-workspace exec "$@"