Skip to content

Fix Jupyter Lite serve instruction #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,16 @@ echo "Running test_xeus_cpp in Google Chrome"
python $BUILD_PREFIX/bin/emrun.py --browser="google-chrome" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html
```

To build Jupyter Lite with this kernel without creating a website you can execute the following
To build and test Jupyter Lite with this kernel locally you can execute the following
```bash
micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus -c conda-forge
micromamba activate xeus-lite-host
jupyter lite build --XeusAddon.prefix=$PREFIX \
jupyter lite serve --XeusAddon.prefix=$PREFIX \
--XeusAddon.mounts="$PREFIX/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
--XeusAddon.mounts="$PREFIX/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" \
--contents README.md \
--contents notebooks/xeus-cpp-lite-demo.ipynb \
--contents notebooks/smallpt.ipynb \
--contents notebooks/images/marie.png \
--contents notebooks/audio/audio.wav
```

Once the Jupyter Lite site has built you can test the website locally by executing
```bash
jupyter lite serve --XeusAddon.prefix=$PREFIX
```
```
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ echo "Running test_xeus_cpp in Google Chrome"
python $BUILD_PREFIX/bin/emrun.py --browser="google-chrome" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html
```

To build Jupyter Lite with this kernel without creating a website you can execute the following
To build and test Jupyter Lite with this kernel locally you can execute the following
```bash
micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus -c conda-forge
micromamba activate xeus-lite-host
jupyter lite build --XeusAddon.prefix=$PREFIX \
jupyter lite serve --XeusAddon.prefix=$PREFIX \
--XeusAddon.mounts="$PREFIX/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
--XeusAddon.mounts="$PREFIX/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" \
--contents README.md \
Expand All @@ -171,11 +171,6 @@ jupyter lite build --XeusAddon.prefix=$PREFIX \
--contents notebooks/audio/audio.wav
```

Once the Jupyter Lite site has built you can test the website locally by executing
```bash
jupyter lite serve --XeusAddon.prefix=$PREFIX
```

## Trying it online

To try out xeus-cpp interactively in your web browser, just click on the binder link:
Expand Down
10 changes: 2 additions & 8 deletions docs/source/InstallationAndUsage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ To do this on Ubuntu x86 execute the following
echo "Running test_xeus_cpp in Google Chrome"
python $BUILD_PREFIX/bin/emrun.py --browser="google-chrome" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html

To build Jupyter Lite with this kernel without creating a website you can execute the following
To build and test Jupyter Lite with this kernel locally you can execute the following

.. code-block:: bash

micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus -c conda-forge
micromamba activate xeus-lite-host
jupyter lite build --XeusAddon.prefix=$PREFIX
jupyter lite serve --XeusAddon.prefix=$PREFIX
--XeusAddon.mounts="$PREFIX/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
--XeusAddon.mounts="$PREFIX/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" \
--contents README.md \
Expand All @@ -141,12 +141,6 @@ To build Jupyter Lite with this kernel without creating a website you can execut
--contents notebooks/images/marie.png \
--contents notebooks/audio/audio.wav

Once the Jupyter Lite site has built you can test the website locally by executing

.. code-block:: bash

jupyter lite serve --XeusAddon.prefix=$PREFIX

Installing from conda-forge
===========================

Expand Down