Last active
March 19, 2023 03:53
-
-
Save dsuess/059b86ea55d639bb99175c9a8cd2ca3e to your computer and use it in GitHub Desktop.
xeus-cling C++ Jupyter kernel inside a docker container
This file contains 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
FROM frolvlad/alpine-miniconda3 | |
RUN conda install -y -c conda-forge bash jupyter jupyter_contrib_nbextensions | |
RUN conda install -y -c conda-forge xeus-cling xtensor | |
RUN mkdir /notebooks |
Building image as:
docker build -t cling .
and running as above, when presented with the cell:
for(int i = 0; i < 10; ++i) ;
(under c++11/ 14/ 17) yields the error:
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
LC_ALL=C x86_64-conda-linux-gnu-c++ -O3 -DNDEBUG -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
^~~~~
Warning in cling::IncrementalParser::CheckABICompatibility():
Failed to extract C++ standard library version.
The cling works with this miniconda version as base image:
docker run -i -t continuumio/miniconda3 /bin/bash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run using
docker run --rm -p 8888:8888 --workdir /notebooks -it cling jupyter notebook --allow-root --ip 0.0.0.0