Skip to content

Commit

Permalink
Improve Binder and launch jupyverse directly
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Sep 24, 2021
1 parent f36b9b1 commit 098ca32
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 110 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://github.com/jupyter-server/jupyverse/workflows/CI/badge.svg)](https://github.com/jupyter-server/jupyverse/actions)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-server/jupyverse/HEAD?filepath=examples%2Fjupyverse.ipynb)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-server/jupyverse/HEAD

# jupyverse

Expand Down
4 changes: 1 addition & 3 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ channels:
- conda-forge
dependencies:
- python =3.9
- jupyterlab =3
- ipyurl
- jupyter-server-proxy >=1.5
- jupyter-server-proxy
- pip
25 changes: 25 additions & 0 deletions binder/jupyter_notebook_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
jupyverse_command = ' '.join([
'jupyverse',
'--no-open-browser',
'--authenticator.mode=noauth',
'--JupyterLab.collaborative',
'--RetroLab.enabled=false',
'--JupyterLab.base_url={base_url}jupyverse',
'--port={port}',
])


c.ServerProxy.servers = {
'jupyverse': {
'command': [
'/bin/bash', '-c', jupyverse_command
],
'timeout': 60,
'absolute_url': True
},
}

c.NotebookApp.default_url = '/jupyverse'

import logging
c.NotebookApp.log_level = logging.DEBUG
2 changes: 0 additions & 2 deletions binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ python -m pip install plugins/terminals
python -m pip install plugins/nbconvert
python -m pip install plugins/yjs
python -m pip install plugins/auth

jupyter serverextension enable --sys-prefix jupyter_server_proxy
12 changes: 12 additions & 0 deletions binder/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python3
import sys
import shutil
import os

argv = sys.argv[1:] + ['--config', 'binder/jupyter_notebook_config.py']
print(argv)

with open('startup_args.txt', 'w') as fid:
fid.write(str(argv))

os.execv(shutil.which(argv[0]), argv)
104 changes: 0 additions & 104 deletions examples/jupyverse.ipynb

This file was deleted.

0 comments on commit 098ca32

Please sign in to comment.