'Podman/Buildah Install/Use cling-xeus

I am trying to get xeus-cling to work on a OCI image, currently I am using buildah + podman. I run into two problems

  1. I try to create an environment with mamba/conda, however it needs conda/mamba init bash too run then to restart the shell. But its hard to get it to restart while its building, I have tried building multistage images, exit, running /bin/bash. I noticed conda checks too see if certain files are configured in a certain way, including /home/joyvan/.bashrc, I cat'd out the modified .bashrc and COPY'd it too the image -- no dice. activate tells me I need to run init
  2. I have tried installing it without the environment, I keep getting the error
Encountered problems while solving:
 - nothing provides system needed by clangdev-5.0.0-default_0

I don't know which package specifically clangdev-5.0.0-default_0 is in (hence a bunch of commented out C++ relevant packages in the Dockerfile)

I have even got notebook to run a couple of times (cant remember what I did) but did not see the option to create a C++ notebook. I am wondering if this may be due to the fact that

I have put my Dockerfile in its current state below (I went a little crazy with Ctrl+Z)

Thank you for reading

  • TFB :)
FROM docker.io/jupyter/scipy-notebook:latest

SHELL [ "/bin/bash", "-c" ]

RUN mamba install -y xeus -c conda-forge
RUN mamba install -y jupyterlab -c conda-forge

# RUN conda install gcc7 -c conda-forge
# RUN mamba install -y -c conda-forge clangdev
# RUN mamba install -y -c conda-forge/label/llvm_rc clangdev
# RUN mamba install -y -c conda-forge/label/cf202003 clangdev
# RUN mamba install -y -c conda-forge/label/gcc7 clangdev
# RUN mamba install -y -c conda-forge/label/broken clangdev
# RUN mamba install -y -c conda-forge/label/cf201901 clangdev


RUN mamba install -y -c conda-forge jupyter_contrib_nbextensions 
# RUN conda init bash
# RUN conda create -n cling
# RUN conda activate cling
RUN mamba install -y xeus-cling -c conda-forge


Solution 1:[1]

There is a proper answer above, but I just wanted to post that I also have a "hack". You may have noticed if you enter the juypter interface there is a New -> Terminal option. Installing xues-cling worked on this terminal, so I just used it to install xues-cling, it wound up working, it can probably (and preferably) be done with mamba, but some of my other hacks at the time worked with conda

FROM docker.io/jupyter/scipy-notebook:latest

RUN pip install jupyter-console
RUN conda create -y -n xeus-cling
RUN jupyter console source activate xeus-cling
RUN conda install -y -c conda-forge xeus-cling

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 The Floating Brain