Skip to content

Instantly share code, notes, and snippets.

@dsuess
Last active Jul 7, 2021
Embed
What would you like to do?
xeus-cling C++ Jupyter kernel inside a docker container
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
@dsuess

This comment has been minimized.

Copy link
Owner Author

@dsuess dsuess commented Mar 20, 2019

Run using docker run --rm -p 8888:8888 --workdir /notebooks -it cling jupyter notebook --allow-root --ip 0.0.0.0

@tomssem

This comment has been minimized.

Copy link

@tomssem tomssem commented Jan 6, 2021

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.
@mulderp

This comment has been minimized.

Copy link

@mulderp mulderp commented Jan 24, 2021

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