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 8dd35d0
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 113 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
24 changes: 24 additions & 0 deletions binder/jupyter_notebook_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
jupyverse_command = ' '.join([
'jupyverse',
'--no-open-browser',
'--authenticator.mode=noauth',
'--JupyterLab.collaborative',
'--JupyterLab.base_url={base_url}jupyverse/',
'--port={port}',
] + ['>jupyverse.log 2>&1'])


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

c.NotebookApp.default_url = '/jupyverse'

import logging
c.NotebookApp.log_level = logging.DEBUG
14 changes: 9 additions & 5 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/bin/bash

python -m pip install git+https://github.com/jupyter-server/fps
python -m pip install fps-uvicorn==0.0.2
mkdir fps \
&& wget -q https://github.com/davidbrochart/fps/archive/root_path.tar.gz -O - \
| tar xz -C fps --strip-components=1 \
&& cd fps \
&& python -m pip install . \
&& python -m pip install plugins/uvicorn \
&& cd .. \
&& rm -rf fps

python -m pip install .[jupyterlab] --no-deps
python -m pip install plugins/jupyterlab
python -m pip install plugins/retrolab
python -m pip install plugins/contents
python -m pip install plugins/kernels
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 8dd35d0

Please sign in to comment.