Helper commands to start developing xeus-based kernels for JupyterLite. It allows building a JupyterLite instance with the local version of empack
, xeus-python
, pyjs
and jupyterlite_xeus
together.
- nodejs >=18
- docker >=23
- At the root of this repo, create a
.env
file containing the path topyjs
,xeus-python
,jupyterlite-xeus
, andempack
source code.
# .env file
PY_JS_PATH=../pyjs
JUPYTERLITE_XEUS_PATH=../xeus
XEUS_PYTHON_PATH=../xeus-python
EMPACK_PATH=../empack
- Build image (only need to run once)
npm install
npm run build
- Build
jupyterlite
:
npm start
jupyterlite
assets will be available at ./jupyterlite/_output
, you can serve the site with any static file server, for example:
python -m http.server 3344 -d jupyterlite/_output
- Build JupyterLite and watch for code changes:
npm start:watch
- Optional commands:
npm run clean # Clean build assets
npm run start:bash # Open a bash shell in the container
-
All files located in
./jupyterlite
will be copied to the build directory in the container. So you can add your config file (jupyter_lite_config.py|json
,...) to this directory. -
To add local JupyterLite extensions to the build, update
.env
file with path to your extensions and key prefixed byJUPYTERLITE_EXTERNAL
#.env file
JUPYTERLITE_EXTERNAL_MY_CUSTOM_EXTENSION=../demo/my-custom-ext
- To install additional packages to the kernel enviromnent, create
jupyterlite/environment.yml
file with following content:
name: xeus-build-wasm
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- package-1
- package-2