From e5e725242a37e82d0b94acce9af936182e83a23d Mon Sep 17 00:00:00 2001 From: David Brochart Date: Fri, 24 Sep 2021 14:27:03 +0200 Subject: [PATCH] Add RetroLab Binder --- README.md | 5 ++++- binder/jupyter_notebook_config.py | 31 +++++++++++++++++++++++++------ binder/postBuild | 1 + 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cc0b15d4..a7e1f675 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ [![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?urlpath=jupyverse # jupyverse @@ -9,6 +8,10 @@ A set of [FPS](https://github.com/jupyter-server/fps) plugins implementing a Jupyter server. +Try it online: +- JupyterLab frontend: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-server/jupyverse/HEAD?urlpath=jupyverse-jlab) +- RetroLab frontend: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-server/jupyverse/HEAD?urlpath=jupyverse-rlab) + ## Motivation for Experimental Server diff --git a/binder/jupyter_notebook_config.py b/binder/jupyter_notebook_config.py index 2a80d2e2..8777d60b 100644 --- a/binder/jupyter_notebook_config.py +++ b/binder/jupyter_notebook_config.py @@ -1,24 +1,43 @@ -jupyverse_command = ' '.join([ +jupyverse_jlab_command = ' '.join([ 'jupyverse', '--no-open-browser', '--authenticator.mode=noauth', + '--RetroLab.enabled=false', '--JupyterLab.collaborative', - '--JupyterLab.base_url={base_url}jupyverse/', + '--JupyterLab.base_url={base_url}jupyverse-jlab/', '--port={port}', -] + ['>jupyverse.log 2>&1']) +] + ['>jupyverse_jlab.log 2>&1']) + + +jupyverse_rlab_command = ' '.join([ + 'jupyverse', + '--no-open-browser', + '--authenticator.mode=noauth', + '--JupyterLab.enabled=false', + '--RetroLab.collaborative', + '--RetroLab.base_url={base_url}jupyverse-rlab/', + '--port={port}', +] + ['>jupyverse_rlab.log 2>&1']) c.ServerProxy.servers = { - 'jupyverse': { + 'jupyverse-jlab': { + 'command': [ + '/bin/bash', '-c', jupyverse_jlab_command + ], + 'timeout': 60, + 'absolute_url': False + }, + 'jupyverse-rlab': { 'command': [ - '/bin/bash', '-c', jupyverse_command + '/bin/bash', '-c', jupyverse_rlab_command ], 'timeout': 60, 'absolute_url': False }, } -c.NotebookApp.default_url = '/jupyverse' +c.NotebookApp.default_url = '/jupyverse-jlab' import logging c.NotebookApp.log_level = logging.DEBUG diff --git a/binder/postBuild b/binder/postBuild index 71a13929..df49f7ed 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -11,6 +11,7 @@ mkdir 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