Skip to content

Commit

Permalink
Support additional kernel packages
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Oct 18, 2024
1 parent 77dce75 commit fc245cf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,15 @@ npm run start:bash # Open a bash shell in the container
#.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:

```yaml
name: xeus-build-wasm
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- package-1
- package-2
```
4 changes: 4 additions & 0 deletions script/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

echo "############## INSTALLING EMPACK ##############"
cd /home/$MAMBA_USER/empack
Expand Down Expand Up @@ -43,5 +44,8 @@ cd /home/$MAMBA_USER/xeus
rm -fr tsconfig.tsbuildinfo
python -m pip install -e . -v --no-build-isolation
cd $LITE_DIR
if [ -f ./environment.yml ]; then
micromamba install -n $WASM_BUILD_ENV --platform=emscripten-wasm32 -f ./environment.yml --yes
fi
rm -fr _output .jupyterlite.doit.db
jupyter lite build --XeusAddon.prefix=$PREFIX --XeusAddon.mounts=$PREFIX/lib/python3.11/site-packages/pyjs:/lib/python3.11/site-packages/pyjs
2 changes: 1 addition & 1 deletion script/wasm-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- pybind11_json
- bzip2
- zlib
- zstd
- sqlite
- libffi
- exceptiongroup
Expand All @@ -19,4 +20,3 @@ dependencies:
- requests-wasm-polyfill>=0.3.0
- libpython
- numpy

0 comments on commit fc245cf

Please sign in to comment.