Skip to content

Instantly share code, notes, and snippets.

@krassowski
Last active November 16, 2023 17:55
Show Gist options
  • Save krassowski/7d3172a1c343045cdf1bd2a662688bd2 to your computer and use it in GitHub Desktop.
Save krassowski/7d3172a1c343045cdf1bd2a662688bd2 to your computer and use it in GitHub Desktop.
Test binder with link

JupyterLab with lumino linkage

Binder

name: jupyterlab-dev
channels:
- conda-forge
- nodefaults
dependencies:
# runtimes
- nodejs >=18,<19
- python =3.11
# package managers
- pip
- yarn >=3,<4
# build
- hatch-jupyter-builder >=0.3.2
- hatchling >=1.5.0
# run
- async-lru >=1.0.0
- ipykernel
- jinja2 >=3.0.3
- jupyter_core
- jupyter_server >=2.4.0,<3
- jupyter-lsp >=2.0.0
- jupyterlab_server >=2.19.0,<3
- packaging
- tornado >=6.2.0
- traitlets >=5.10.1
# dev
- black-jupyter
- hatch
- pytest-cov
- python-build
- pip:
# can't be installed with `conda` in binder, due to `jupyterlab-link-share``
- jupyter-collaboration ==1.2.0
#!/bin/bash
# ensure no surprises from binder's "half" activation
source activate ${NB_PYTHON_PREFIX}
# use strict and verbose shell settings
set -euxo pipefail
# create log folder, named to appear at the top of the file browser
mkdir _reports_
git clone --depth 1 --single-branch https://github.com/jupyterlab/lumino.git
cd lumino
jlpm && jlpm build
cd ..
git clone --depth 1 --single-branch https://github.com/jupyterlab/jupyterlab.git
cd jupyterlab
jlpm link ../lumino --all
(time jlpm build:dev) 2>&1 | tee ../_reports_/01_build.txt
(time pip install -v -e . --no-build-isolation) 2>&1 | tee ../_reports_/02_pip_install.txt
cd ..
# clean up egregious wastes of space
rm -rf \
~/.cache \
dev_mode/stats.json \
node_modules/@stdlib
#!/bin/bash
echo $@
exec jupyter-lab --dev-mode "${@:4}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment