Created
June 16, 2022 10:48
-
-
Save glor/dc0c7912682d11f2c89e168c85d894b0 to your computer and use it in GitHub Desktop.
Add a locally installed JavaScript (node.js) Kernel to a hosted Jupyter(Lab) instance, permanently
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Dependency: node and npm must be installed on the jupyter(lab) instance. This could probably also be hacked around using nvm (node version manager) | |
cd | |
npm i ijavascript | |
npx ijsinstall | |
sed -i 's/ijskernel/node", "\/home\/jovyan\/node_modules\/ijavascript\/lib\/kernel\.js/g' .local/share/jupyter/kernels/javascript/kernel.json | |
echo "Try to refresh the page (F5). JavaScript notebook and console should be available then." | |
# And as a one-liner for copy&paste: | |
# cd && npm i ijavascript && npx ijsinstall && sed -i 's/ijskernel/node", "\/home\/jovyan\/node_modules\/ijavascript\/lib\/kernel\.js/g' .local/share/jupyter/kernels/javascript/kernel.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment