Skip to content

Instantly share code, notes, and snippets.

@fcollonval
Forked from jtpio/README.md
Last active February 2, 2023 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fcollonval/eafdf338e8a76bdf870f988a16017ba0 to your computer and use it in GitHub Desktop.
Save fcollonval/eafdf338e8a76bdf870f988a16017ba0 to your computer and use it in GitHub Desktop.
JupyterLab 3.6.0

JupyterLab 3.6.0 on Binder

Binder

Features

  • Real Time Collaboration enabled
  • File ID manager setup: jupyter_server_fileid.manager.LocalFileIdManager

You can access the server log by displaying ~/.jupyter-server-log.txt in a terminal.

We are forcing launching jupyter-lab and not jupyter-notebook because jupyter-server v2 does not work with jupyter-notebook on Binder.

rtc-demo

{
"LabApp": { "collaborative": true },
"ContentsManager": { "allow_hidden": true },
"FileIdExtension": { "file_id_manager_class": "jupyter_server_fileid.manager.LocalFileIdManager" }
}
# generate non minified assets so it's easier to step into the code on Binder
jupyter lab build --minimize=False || true
jupyterlab>=3.6.0,<3.7.0
jupyterlab-link-share
jupyter-server>=2.0.0,<3.0.0
#!/usr/bin/env python3
import sys
import shutil
import os
# os.environ["JUPYTERHUB_SINGLEUSER_APP"] = "jupyter_server.serverapp.ServerApp"
argv = sys.argv[1:] + ["--debug", "--config", "jupyter_config.json"]
print(argv)
# Convert from jupyter-notebook based to jupyter-lab based start-up
def nb2jps(s):
# return s
return s.replace("jupyter-notebook", "jupyter-lab").replace("--NotebookApp.", "--ServerApp.")
new_argv = list(map(nb2jps, argv.copy()))
print(new_argv)
with open(".startup_args.txt", "w") as fid:
fid.write(str(new_argv))
os.execv(shutil.which(new_argv[0]), new_argv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment