I built a docker image for VAPOR Python API(3.9.0) and jupyter vapor widget(1.0.0) in conda environment linked to ipython kernel of Jupyter Lab.
Jupyter Lab was run in a Docker container. I attempted to run VAPOR examples in Jupyter Lab using the conda vapor python kernel, however the ipython kernel died and was restarted.
In order to find it’s cause, I ran each line of the example in a Jupyter Lab terminal, and segmentation violation error occurred in the code to import the vapor module such as below.
Please help me to fix this error.
Many thanks,
Joon
(vapor_python) wjnadia : /scratch/wjnadia/VAPOR/examples$ python
Python 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:22:55)
[GCC 10.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
‘>>>’ import example_utils
‘>>>’ from vapor import session, renderer, dataset, camera, utils
/opt/conda/envs/vapor_python/lib/python3.9/site-packages/cppyy_backend/loader.py:130: UserWarning: No precompiled header available (/opt/conda/envs/vapor_python/lib/python3.9/site-packages/cppyy_backend/etc not writable, set CLING_STANDARD_PCH); this may impact performance.
warnings.warn(‘No precompiled header available (%s); this may impact performance.’ % msg)
Vapor 3.9.0
Python 3.9.18 (/opt/conda/envs/vapor_python)
[GLContextProviderNvidia.cpp:20] Could not load EGL
[GLContextProviderEGL.cpp:27] Could not load EGL
[GLContextProvider.cpp:28] Could not get an OpenGL context from the display manager. Is one running?
[GLContextProvider.cpp:29] Falling back to software rendering
OpenGL 3.3 (Core Profile) Mesa 21.2.5
input_line_36:2:19: error: no type named ‘TStreamerInfo’ in namespace ‘CppyyLegacy’
** new CppyyLegacy::TStreamerInfo{};**
** ~~~~~~~~~~~~~^**
** *** Break *** segmentation violation**
Generating stack trace…
0x00007f3e2f0b6a36 in CppyyLegacy::TClass::TClass(char const*, short, bool) + 0x236 from /opt/conda/envs/vapor_python/lib/python3.9/site-packages/cppyy_backend/lib/libCoreLegacy.so
0x00007f3e2d347b26 in from /opt/conda/envs/vapor_python/lib/python3.9/site-packages/cppyy_backend/lib/libCling.so
0x00007f3e2f0b0a87 in CppyyLegacy::TClass::GetClass(char const*, bool, bool) at TClass.cxx:? from /opt/conda/envs/vapor_python/lib/python3.9/site-packages/cppyy_backend/lib/libCoreLegacy.so
0x00007f3e28121c74 in Cppyy::GetScope(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x104 from /opt/conda/envs/vapor_python/lib/python3.9/site-packages/cppyy_backend/lib/libcppyy_backend.so
0x00007f3e27d8315a in CPyCppyy::CreateScopeProxy(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, _object*, unsigned int) at ProxyWrappers.cxx:? from /opt/conda/envs/vapor_python/lib/python3.9/site-packages/libcppyy.cpython-39-x86_64-linux-gnu.so
0x00007f3e27d49fd5 in from /opt/conda/envs/vapor_python/lib/python3.9/site-packages/libcppyy.cpython-39-x86_64-linux-gnu.so
((a packages for vapor and cppyy list in conda environment for vapor python))
(vapor_python) I have no name!@jupyter-vapor-68cc5d9d5-hxp6s:/scratch/wjnadia/VAPOR/examples$ conda list |grep vapor
jupyter-vapor-widget 1.0.0 py39_0 ncar-vapor
vapor 3.9.0 h2bc3f7f_0 ncar-vapor
vapor-maps 1.0.0 0 ncar-vapor
(vapor_python) I have no name!@jupyter-vapor-68cc5d9d5-hxp6s:/scratch/wjnadia/VAPOR/examples$ conda list |grep cppyy
cppyy 2.2.0 py39ha3ed2ce_1 conda-forge
cppyy-backend 1.14.7 py39h1a9c180_0 conda-forge
cppyy-cling 6.25.2 py39h0f9e12e_1 conda-forge
cpycppyy 1.12.8 py39h1a9c180_1 conda-forge
((Dockerfile to build docker image))
FROM jupyter/base-notebook:latest
USER root
RUN apt update
RUN apt install git nodejs npm libqt5core5a build-essential -y
RUN chmod o+rx /home/jovyan
RUN git clone GitHub - NCAR/jupyter-vapor-widget
RUN cd jupyter-vapor-widget
RUN pip install -e /home/jovyan/jupyter-vapor-widget
RUN jupyter labextension install /home/jovyan/jupyter-vapor-widget/js jupyter_vapor_widget
RUN conda install -c conda-forge -n base nb_conda_kernels conda-libmamba-solver -y
RUN conda config --set solver libmamba
RUN mamba create -n vapor_python python=3.9 ipython ipykernel conda-libmamba-solver -y
RUN mamba install -c conda-forge -c ncar-vapor -n vapor_python vapor -y
RUN /opt/conda/envs/vapor_python/bin/python -m ipykernel install --user --name=vapor_python --display-name=VAPOR_PYTHON
USER 1000