Running CPP and JS Kernel in Deepnote Jupyter Notebook
If you need to work with a language other than Python, the Jupyter ecosystem offers a wide range of other kernels. Deepnote supports a lot of them!
Deepnote Official documentation has instructions on setting up R, Julia, Bash, Scala and Ruby.
Dockerfile for C++ Kernel
FROM deepnote/python:3.9 RUN apt-get update && \ apt-get install -y g++ libtinfo5 RUN pip install jupyter-console RUN wget https://root.cern.ch/download/cling/cling_2020-11-05_ROOT-ubuntu18.04.tar.bz2 && \ tar -xf cling_2020-11-05_ROOT-ubuntu18.04.tar.bz2 && \ cd cling_2020-11-05_ROOT-ubuntu18.04/share/cling/Jupyter/kernel && \ pip install -e . && \ jupyter-kernelspec install --user cling-cpp17 ENV PATH="cling_2020-11-05_ROOT-ubuntu18.04/bin:$PATH" RUN jupyter console --kernel cling-cpp17 ENV DEFAULT_KERNEL_NAME "cling-cpp17"
After the completion of the build, you can execute C++ in the deepnote notebook.
Some things that don’t work in this version, but maybe supported in upcoming versions of the kernel
Function redefinitions are not allowed. Issue Link
You cannot define more than one function in a block. Issue Link
You can also try to build the latest version and try out these features.