forked from dask/dask-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate dask-labextension into binder deployment (dask#38)
* update versions * move .images to images * Add postBuild script and JupyterLab workspace * add Welcome file * add dask-horizontal logo image Work done with @ian-r-rose
- Loading branch information
Showing
15 changed files
with
190 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
<img src="images/dask-horizontal.svg" width="50%" align="right"> | ||
|
||
Welcome To Dask Examples | ||
======================== | ||
|
||
This is a live session from which you can run example notebooks showing how to use Dask. | ||
|
||
A file browser listing example notebooks is available to the left. There are overview notebooks about topics like arrays, dataframes, and machine learning at the top-level, as well as more focused notebooks within sub-directories. | ||
|
||
Dask dashboard plots are available to the right. These will activate when you | ||
run the cells in your Jupyter notebooks that create a Dask `Client` (these are already written for you). | ||
|
||
To get started, double click on a notebook on the left, like `dataframes.ipynb`, and start running through the Jupyter notebook cells. | ||
|
||
Learn More | ||
---------- | ||
|
||
Links are available within each notebook for additional documentation on that topic. | ||
|
||
For more information about Dask in general please visit [dask.pydata.org](https://dask.pydata.org). | ||
|
||
For more information about these examples please visit [github.com/dask/dask-examples](https://github.com/dask/dask-examples) | ||
|
||
|
||
Where is this running? | ||
---------------------- | ||
|
||
This session is running on [mybinder.org](https://mybinder.org), a service designed and maintained by the Jupyter community, generously funded by the Gordon and Betty Moore Foundation, and currently running on Google Cloud Platform. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"data": { | ||
"layout-restorer:data": { | ||
"main": { | ||
"dock": { | ||
"type": "split-area", | ||
"orientation": "horizontal", | ||
"sizes": [ | ||
0.5, | ||
0.5 | ||
], | ||
"children": [ | ||
{ | ||
"type": "tab-area", | ||
"currentIndex": 0, | ||
"widgets": [ | ||
"application-mimedocuments:Welcome.md:Markdown Preview" | ||
] | ||
}, | ||
{ | ||
"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": "application-mimedocuments:Welcome.md:Markdown Preview" | ||
}, | ||
"left": { | ||
"collapsed": false, | ||
"current": "filebrowser", | ||
"widgets": [ | ||
"filebrowser", | ||
"running-sessions", | ||
"dask-dashboard-launcher", | ||
"command-palette", | ||
"tab-manager" | ||
] | ||
}, | ||
"right": { | ||
"collapsed": true, | ||
"widgets": [] | ||
} | ||
}, | ||
"file-browser-filebrowser:cwd": { | ||
"path": "" | ||
}, | ||
"dask-dashboard-launcher:individual-task-stream": { | ||
"data": { | ||
"route": "individual-task-stream", | ||
"label": "Task Stream" | ||
} | ||
}, | ||
"dask-dashboard-launcher:individual-progress": { | ||
"data": { | ||
"route": "individual-progress", | ||
"label": "Progress" | ||
} | ||
}, | ||
"dask-dashboard-launcher": { | ||
"url": "DASK_DASHBOARD_URL" | ||
}, | ||
"application-mimedocuments:Welcome.md:Markdown Preview": { | ||
"data": { | ||
"path": "Welcome.md", | ||
"factory": "Markdown Preview" | ||
} | ||
} | ||
}, | ||
"metadata": { | ||
"id": "/lab" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os, shutil | ||
from jupyterlab_launcher.workspaces_handler import _slug | ||
|
||
service_path = os.environ.get('JUPYTERHUB_SERVICE_PREFIX') | ||
home = os.environ.get('HOME') | ||
workspace_path = service_path.strip('/') + '/lab' if service_path else '/lab' | ||
filename = _slug(workspace_path, '') + '.jupyterlab-workspace' | ||
shutil.copy( | ||
'./binder/jupyterlab-workspace.json', | ||
f'{home}/.jupyter/lab/workspaces/{filename}' | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
# Install the JupyterLab dask-labextension | ||
jupyter labextension install dask-labextension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# Replace DASK_DASHBOARD_URL with the proxy location | ||
sed -i -e "s|DASK_DASHBOARD_URL|/user/${JUPYTERHUB_USER}/proxy/8787|g" binder/jupyterlab-workspace.json | ||
|
||
# Copy into the workspaces directory | ||
# NOTE: this relies on internal path logic to the JupyterLab workspaces handler. | ||
# As soon as a CLI becomes available for this, we should use that. | ||
mkdir -p ${HOME}/.jupyter/lab/workspaces | ||
python ./binder/make_workspace.py | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters