Skip to content

Instantly share code, notes, and snippets.

@gdlmx
Last active May 15, 2019 11:13
Show Gist options
  • Save gdlmx/c47b339ffa61aa084cb4b88ebf0d704d to your computer and use it in GitHub Desktop.
Save gdlmx/c47b339ffa61aa084cb4b88ebf0d704d to your computer and use it in GitHub Desktop.
Jupyterlab admin scripts
git clone --depth 1 https://github.com/jupyterlab/jupyterlab.git
cd jupyterlab
mkdir -p .bin
cat > .bin/jlpm <<EOF
#!/bin/bash
exec node "$PWD/jupyterlab/staging/yarn.js" "\$@"
EOF
export PATH="$PATH:$PWD/.bin"
node jupyterlab/staging/yarn.js run build:dev
ls dev_mode/static/
# Hacking the setup script (not recommanded)
if [ -z "$BUILD_ONCE" ] ; then
cp -ra ./dev_mode/{schemas,static,templates,themes} ./jupyterlab/
# disable jsdeps command
sed -ie "s/\(create_cmdclass(\)'jsdeps'/\1 None/" setup.py
fi
pip install -e .
jupyter lab --dev-mode --debug --no-browser --NotebookApp.token="" --NotebookApp.allow_remote_access=True
# --dev-mode will use the static files from foler "dev_mode"
# Build JS files for production
export NODE_OPTIONS="--max-old-space-size=4096"
jupyter-lab build --LabBuildApp.dev_build=False
@gdlmx
Copy link
Author

gdlmx commented May 15, 2019

See the binder/ folder in the source for mybinder. Commands for starting the Lab server in dev_mode is contained in file jupyter_notebook_config.py for jupyter-server-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment