Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: extension SlicerJupyter not available in 4.13 preview releases #59

Closed
NilsKlarlund opened this issue Apr 8, 2021 · 18 comments
Closed

Comments

@NilsKlarlund
Copy link

I'm eager to try out new stuff in 4.13 - meanwhile SlicerJupyter has become indispensable. Hope you get a chance to look into the compilation issues on Linux I suspect are at fault because the extension doesn't show up in the extensions manager anymore.
thanks

@lassoan
Copy link
Contributor

lassoan commented Sep 7, 2021

@jcfr @sjh26 Do you have any idea why the extension fails to build with this error on the factory?

https://slicer.cdash.org/viewBuildError.php?buildid=2388789

-- Generating done
-- Build files have been written to: /.../SlicerJupyter-build/xeus-build
[ 76%] Performing build step for 'xeus'
Scanning dependencies of target xeus-static
[  1%] Building CXX object CMakeFiles/xeus-static.dir/src/xauthentication.cpp.o
[  3%] Building CXX object CMakeFiles/xeus-static.dir/src/xcomm.cpp.o
[  4%] Building CXX object CMakeFiles/xeus-static.dir/src/xcontrol.cpp.o
[  6%] Building CXX object CMakeFiles/xeus-static.dir/src/xcontrol_messenger.cpp.o
[  7%] Building CXX object CMakeFiles/xeus-static.dir/src/xdap_tcp_client.cpp.o
/.../SlicerJupyter-build/xeus/src/xdap_tcp_client.cpp: In member function ‘void xeus::xdap_tcp_client::init_tcp_socket(const string&)’:
xeus/src/xdap_tcp_client.cpp:192:44: error: no matching function for call to ‘zmq::message_t::message_t(std::string&)’
             m_socket_id = zmq::message_t(id);
                                            ^
In file included from cppzmq/zmq_addon.hpp:27:0,
                 from xeus/src/xdap_tcp_client.cpp:1:

I've built Slicer and SlicerJupyter on Ubuntu 20.04 with default settings without any issues.

@lassoan
Copy link
Contributor

lassoan commented Sep 7, 2021

Is some very old compiler used on the factory?
How could I reproduce the error on my system so that I can reproduce and (hopefully) fix the error?

@jcfr
Copy link
Member

jcfr commented Sep 7, 2021

Is some very old compiler used on the factory?

We use a centos7 based environment like the one used to build official python package.

It uses gcc5 provided by centos7-devtoolset4 by building on top of dockbuild/centos7-devtoolset4-gcc5. See here

For reference, @sjh26 has been working on updating this and we now have a new dockbuild based image including gcc7, see dockbuild/centos7-devtoolset7-gcc7. Once @sjh26 is back in the "office" (later this week), we should be able to have a status update.

How could I reproduce the error on my system so that I can reproduce and (hopefully) fix the error?

See https://github.com/Slicer/SlicerBuildEnvironment#tutorials

Except you should download the slicer/buildenv-qt5-centos7:latest docker image

@jcfr
Copy link
Member

jcfr commented Sep 7, 2021

After ssh'ing into the build machine, here are more details:

loading initial cache file /work/Preview/S-0-E-b/SlicerJupyter-build/xeus-prefix/tmp/xeus-cache-Release.cmake
-- xeus version: v0.25.3
-- xeus binary version: v1.0.0
-- CMAKE_CXX_FLAGS:    
-- CMAKE_CXX_FLAGS:    
-- tests disabled
-- Configuring done
-- Generating done
-- Build files have been written to: /work/Preview/S-0-E-b/SlicerJupyter-build/xeus-build
[ 62%] Performing build step for 'xeus'
[  1%] Building CXX object CMakeFiles/xeus-static.dir/src/xdap_tcp_client.cpp.o
/work/Preview/S-0-E-b/SlicerJupyter-build/xeus/src/xdap_tcp_client.cpp: In member function ‘void xeus::xdap_tcp_client::init_tcp_socket(const string&)’:
/work/Preview/S-0-E-b/SlicerJupyter-build/xeus/src/xdap_tcp_client.cpp:192:44: error: no matching function for call to ‘zmq::message_t::message_t(std::string&)’
             m_socket_id = zmq::message_t(id);
                                            ^
In file included from /work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq_addon.hpp:27:0,
                 from /work/Preview/S-0-E-b/SlicerJupyter-build/xeus/src/xdap_tcp_client.cpp:1:
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:391:5: note: candidate: zmq::message_t::message_t(zmq::message_t&&)
     message_t(message_t &&rhs) ZMQ_NOTHROW : msg(rhs.msg)
     ^
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:391:5: note:   no known conversion for argument 1 from ‘std::string {aka std::basic_string<char>}’ to ‘zmq::message_t&&’
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:371:5: note: candidate: zmq::message_t::message_t(void*, size_t, void (*)(void*, void*), void*)
     message_t(void *data_, size_t size_, free_fn *ffn_, void *hint_ = ZMQ_NULLPTR)
     ^
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:371:5: note:   candidate expects 4 arguments, 1 provided
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:363:5: note: candidate: zmq::message_t::message_t(const void*, size_t)
     message_t(const void *data_, size_t size_)
     ^
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:363:5: note:   candidate expects 2 arguments, 1 provided
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:350:33: note: candidate: template<class ForwardIter> zmq::message_t::message_t(ForwardIter, ForwardIter)
     template<class ForwardIter> message_t(ForwardIter first, ForwardIter last)
                                 ^
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:350:33: note:   template argument deduction/substitution failed:
/work/Preview/S-0-E-b/SlicerJupyter-build/xeus/src/xdap_tcp_client.cpp:192:44: note:   candidate expects 2 arguments, 1 provided
             m_socket_id = zmq::message_t(id);
                                            ^
In file included from /work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq_addon.hpp:27:0,
                 from /work/Preview/S-0-E-b/SlicerJupyter-build/xeus/src/xdap_tcp_client.cpp:1:
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:343:14: note: candidate: zmq::message_t::message_t(size_t)
     explicit message_t(size_t size_)
              ^
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:343:14: note:   no known conversion for argument 1 from ‘std::string {aka std::basic_string<char>}’ to ‘size_t {aka long unsigned int}’
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:337:5: note: candidate: zmq::message_t::message_t()
     message_t() ZMQ_NOTHROW
     ^
/work/Preview/S-0-E-b/SlicerJupyter-build/cppzmq/zmq.hpp:337:5: note:   candidate expects 0 arguments, 1 provided
make[5]: *** [CMakeFiles/xeus-static.dir/src/xdap_tcp_client.cpp.o] Error 1

Happy to try suggestions

@lassoan
Copy link
Contributor

lassoan commented Sep 8, 2021

This could probably fixed by either going back to some earlier xeus version, or update the compiler. If @sjh26 can test the build on the new image and it works then that would be much preferable.

@jamesobutler
Copy link
Contributor

For reference in terms of picking a newer GCC version, Qt6 is using GCC9 as the compiler for most linux distros https://doc-snapshots.qt.io/qt6-dev/supported-platforms.html in addition to minimum usage of C++17 rather than C++11 in Qt5.

GCC9 was released May 2019 and was the first to mark full support for C++17 which is probably why Qt6 chose it.

^Something to consider if updating GCC on factory

@lassoan
Copy link
Contributor

lassoan commented Oct 7, 2021

@sjh26 Has the compiler been updated on the factory machine? (SlicerJupyter still has that build error on linux while it builds fine on Windows and macOS)

@sjh26
Copy link

sjh26 commented Oct 7, 2021

Sorry, I haven't been able to work on this lately. I can test the build with the GCC 7 image this week.

@lassoan
Copy link
Contributor

lassoan commented Oct 7, 2021

That would be great, thanks a lot!

@lassoan
Copy link
Contributor

lassoan commented Oct 7, 2021

In the meantime, here is a SlicerJupyter installation package (SlicerJupyter-gitb3fba2d-2021-03-21) for Linux for latest Slicer Preview Release (Slicer-4.13.0-2021-10-06) c:\Users\andra\Downloads\30304-linux-amd64-SlicerJupyter-gitb3fba2d-2021-03-21.tar.gz) for testing:

30304-linux-amd64-SlicerJupyter-gitb3fba2d-2021-03-21.tar.gz

@dazzag24
Copy link

dazzag24 commented Oct 7, 2021

Using these args

ARG SLICER_ARCHIVE=Slicer-4.13.0-2021-10-06-linux-amd64
ARG SLICER_DOWNLOAD_URL=https://download.slicer.org/bitstream/615e75f7342a877cb3ccd8fa

in my Dockerfile I am unable to get the install.sh to run without an error. Note requires the latest changes in dazzag24/SlicerDocker@6e89bbf

returned a non-zero code: 127
Step 29/39 : RUN ./install.sh ${HOME}/Slicer/Slicer &&     rm ${HOME}/install.sh
 ---> Running in 1162a2ad1221
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Debian
Current Operating System: Linux 1162a2ad1221 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.0-84-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro
Build Date: 13 April 2021  04:07:31PM
xorg-server 2:1.20.11-1 (https://www.debian.org/support) 
Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "./10.log", Time: Thu Oct  7 19:38:15 2021
(++) Using config file: "/home/sliceruser/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
XORG_PID [12]
Set default application settings
Install SlicerJupyter extension
extensionMetaData: {}
Using bespoke build from {url} until https://github.com/Slicer/SlicerJupyter/issues/59 is fixed
Downloading from
  https://github.com/Slicer/SlicerJupyter/files/7305919/30304-linux-amd64-SlicerJupyter-gitb3fba2d-2021-03-21.tar.gz
as file
  /tmp/Slicer-/30304-linux-amd64-SlicerJupyter-gitb3fba2d-2021-03-21.tar.gz
It may take a few minutes...
Installed extension SlicerJupyter revision b3fba2d
Install Jupyter server (in Slicer's Python environment) and Slicer Jupyter kernel
Collecting pillow
  Downloading Pillow-8.3.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
Installing collected packages: pillow
  Attempting uninstall: pillow
    Found existing installation: Pillow 8.3.2
    Uninstalling Pillow-8.3.2:
      Successfully uninstalled Pillow-8.3.2
Successfully installed pillow-8.3.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting jupyter
  Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting ipywidgets
  Downloading ipywidgets-7.6.5-py2.py3-none-any.whl (121 kB)
Collecting pandas
  Downloading pandas-1.1.5-cp36-cp36m-manylinux1_x86_64.whl (9.5 MB)
Collecting ipyevents
  Downloading ipyevents-2.0.1-py2.py3-none-any.whl (130 kB)
Collecting ipycanvas
  Downloading ipycanvas-0.9.0-py2.py3-none-any.whl (246 kB)
Collecting jupyter-console
  Downloading jupyter_console-6.4.0-py3-none-any.whl (22 kB)
Requirement already satisfied: ipykernel in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter) (5.5.6)
Requirement already satisfied: nbconvert in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter) (6.0.7)
Requirement already satisfied: notebook in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter) (6.4.4)
Collecting qtconsole
  Downloading qtconsole-5.1.1-py3-none-any.whl (119 kB)
Requirement already satisfied: ipython-genutils~=0.2.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (0.2.0)
Requirement already satisfied: traitlets>=4.3.1 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (4.3.3)
Requirement already satisfied: ipython>=4.0.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (7.16.1)
Requirement already satisfied: nbformat>=4.2.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (5.1.3)
Collecting widgetsnbextension~=3.5.0
  Downloading widgetsnbextension-3.5.1-py2.py3-none-any.whl (2.2 MB)
Collecting jupyterlab-widgets>=1.0.0
  Downloading jupyterlab_widgets-1.0.2-py3-none-any.whl (243 kB)
Requirement already satisfied: numpy>=1.15.4 in ./Slicer/lib/Python/lib/python3.6/site-packages (from pandas) (1.19.5)
Requirement already satisfied: pytz>=2017.2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from pandas) (2021.3)
Requirement already satisfied: python-dateutil>=2.7.3 in ./Slicer/lib/Python/lib/python3.6/site-packages (from pandas) (2.8.2)
Requirement already satisfied: pillow>=6.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipycanvas) (8.3.2)
Requirement already satisfied: jupyter-client in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipykernel->jupyter) (7.0.6)
Requirement already satisfied: tornado>=4.2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipykernel->jupyter) (6.1)
Requirement already satisfied: pexpect in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (4.8.0)
Requirement already satisfied: backcall in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (0.2.0)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (3.0.20)
Requirement already satisfied: jedi>=0.10 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (0.18.0)
Requirement already satisfied: decorator in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (5.1.0)
Requirement already satisfied: setuptools>=18.5 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (58.1.0)
Requirement already satisfied: pickleshare in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (0.7.5)
Requirement already satisfied: pygments in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (2.10.0)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jedi>=0.10->ipython>=4.0.0->ipywidgets) (0.8.2)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbformat>=4.2.0->ipywidgets) (3.2.0)
Requirement already satisfied: jupyter-core in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbformat>=4.2.0->ipywidgets) (4.8.1)
Requirement already satisfied: six>=1.11.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (1.16.0)
Requirement already satisfied: pyrsistent>=0.14.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (0.18.0)
Requirement already satisfied: importlib-metadata in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (4.8.1)
Requirement already satisfied: attrs>=17.4.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (21.2.0)
Requirement already satisfied: wcwidth in ./Slicer/lib/Python/lib/python3.6/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=4.0.0->ipywidgets) (0.2.5)
Requirement already satisfied: prometheus-client in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (0.11.0)
Requirement already satisfied: pyzmq>=17 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (22.3.0)
Requirement already satisfied: jinja2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (3.0.2)
Requirement already satisfied: terminado>=0.8.3 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (0.12.1)
Requirement already satisfied: Send2Trash>=1.5.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (1.8.0)
Requirement already satisfied: argon2-cffi in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (21.1.0)
Requirement already satisfied: entrypoints in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter-client->ipykernel->jupyter) (0.3)
Requirement already satisfied: nest-asyncio>=1.5 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter-client->ipykernel->jupyter) (1.5.1)
Requirement already satisfied: ptyprocess in ./Slicer/lib/Python/lib/python3.6/site-packages (from terminado>=0.8.3->notebook->jupyter) (0.7.0)
Requirement already satisfied: cffi>=1.0.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from argon2-cffi->notebook->jupyter) (1.14.6)
Requirement already satisfied: pycparser in ./Slicer/lib/Python/lib/python3.6/site-packages (from cffi>=1.0.0->argon2-cffi->notebook->jupyter) (2.20)
Requirement already satisfied: zipp>=0.5 in ./Slicer/lib/Python/lib/python3.6/site-packages (from importlib-metadata->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (3.6.0)
Requirement already satisfied: typing-extensions>=3.6.4 in ./Slicer/lib/Python/lib/python3.6/site-packages (from importlib-metadata->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (3.10.0.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jinja2->notebook->jupyter) (2.0.1)
Requirement already satisfied: pandocfilters>=1.4.1 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (1.5.0)
Requirement already satisfied: testpath in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.5.0)
Requirement already satisfied: bleach in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (4.1.0)
Requirement already satisfied: mistune<2,>=0.8.1 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.8.4)
Requirement already satisfied: defusedxml in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.7.1)
Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.5.4)
Requirement already satisfied: jupyterlab-pygments in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.1.2)
Requirement already satisfied: async-generator in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->jupyter) (1.10)
Requirement already satisfied: packaging in ./Slicer/lib/Python/lib/python3.6/site-packages (from bleach->nbconvert->jupyter) (21.0)
Requirement already satisfied: webencodings in ./Slicer/lib/Python/lib/python3.6/site-packages (from bleach->nbconvert->jupyter) (0.5.1)
Requirement already satisfied: pyparsing>=2.0.2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from packaging->bleach->nbconvert->jupyter) (2.4.7)
Collecting qtpy
  Downloading QtPy-1.11.2-py2.py3-none-any.whl (58 kB)
Installing collected packages: widgetsnbextension, qtpy, jupyterlab-widgets, qtconsole, jupyter-console, ipywidgets, pandas, jupyter, ipyevents, ipycanvas
Successfully installed ipycanvas-0.9.0 ipyevents-2.0.1 ipywidgets-7.6.5 jupyter-1.0.0 jupyter-console-6.4.0 jupyterlab-widgets-1.0.2 pandas-1.1.5 qtconsole-5.1.1 qtpy-1.11.2 widgetsnbextension-3.5.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Enabling notebook extension jupyter-js-widgets/extension...
      - Validating: OK
Enabling notebook extension ipyevents/extension...
      - Validating: OK
The command '/bin/sh -c ./install.sh ${HOME}/Slicer/Slicer &&     rm ${HOME}/install.sh' returned a non-zero code: 127

However using

ARG SLICER_ARCHIVE=Slicer-4.11.20200930-linux-amd64
ARG SLICER_DOWNLOAD_URL=https://download.slicer.org/bitstream/60add70fae4540bf6a89bfb4

the container builds successfully:

Step 29/39 : RUN ./install.sh ${HOME}/Slicer/Slicer &&     rm ${HOME}/install.sh
 ---> Running in 977d68a048d7
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Debian
Current Operating System: Linux 977d68a048d7 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.0-84-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro
Build Date: 13 April 2021  04:07:31PM
xorg-server 2:1.20.11-1 (https://www.debian.org/support) 
Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "./10.log", Time: Thu Oct  7 19:40:37 2021
(++) Using config file: "/home/sliceruser/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
XORG_PID [12]
Set default application settings
QStandardPaths: wrong permissions on runtime directory /tmp/runtime-sliceruser, 7755 instead of 7700
Info: In /work/Stable/Slicer-0/Libs/MRML/Core/vtkMRMLScene.cxx, line 316
vtkMRMLScene (0x10b1810): vtkMRMLScene::Clear

Install SlicerJupyter extension
QStandardPaths: wrong permissions on runtime directory /tmp/runtime-sliceruser, 7755 instead of 7700
extensionMetaData: {'arch': 'amd64', 'archivename': '29402_SlicerJupyter_linux_amd64_616aa24.tar.gz', 'category': 'Developer Tools', 'contributors': '', 'date_creation': '2021-06-03T05:17:13.997000+00:00', 'description': 'This extension provides a Jupyter kernel, which allows running Jupyter notebooks in 3D Slicer.', 'enabled': '1', 'extension_id': '60b865d93987204c4bf545b0', 'extensionname': 'SlicerJupyter', 'homepage': 'https://github.com/Slicer/SlicerJupyter', 'iconurl': 'https://raw.githubusercontent.com/Slicer/SlicerJupyter/master/SlicerJupyterLogo.png', 'item_id': '60b865d93987204c4bf545b0', 'os': 'linux', 'revision': '616aa24', 'scm': 'git', 'scmurl': 'https://github.com/Slicer/SlicerJupyter.git', 'screenshots': 'https://raw.githubusercontent.com/NA-MIC/ProjectWeek/master/PW28_2018_GranCanaria/Projects/SlicerJupyter/NotebookOnly.png https://raw.githubusercontent.com/NA-MIC/ProjectWeek/master/PW28_2018_GranCanaria/Projects/SlicerJupyter/NotebookSideBySide.png https://raw.githubusercontent.com/NA-MIC/ProjectWeek/master/PW28_2018_GranCanaria/Projects/SlicerJupyter/JupyterLab.png', 'slicer_revision': '29402'}
itemId: 60b865d93987204c4bf545b0 url: http://slicer.kitware.com/midas3/download?items=60b865d93987204c4bf545b0
Downloading from
  http://slicer.kitware.com/midas3/download?items=60b865d93987204c4bf545b0
as file
  /tmp/Slicer-/60b865d93987204c4bf545b0
It may take a few minutes...
"Installed extension SlicerJupyter revision 616aa24"
Info: In /work/Stable/Slicer-0/Libs/MRML/Core/vtkMRMLScene.cxx, line 316
vtkMRMLScene (0x1cc2fc0): vtkMRMLScene::Clear

Install Jupyter server (in Slicer's Python environment) and Slicer Jupyter kernel
QStandardPaths: wrong permissions on runtime directory /tmp/runtime-sliceruser, 7755 instead of 7700
Collecting pillow
  Downloading Pillow-8.3.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
Installing collected packages: pillow
  Attempting uninstall: pillow
    Found existing installation: Pillow 7.2.0
    Uninstalling Pillow-7.2.0:
      Successfully uninstalled Pillow-7.2.0
Successfully installed pillow-8.3.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting jupyter
  Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting ipywidgets
  Downloading ipywidgets-7.6.5-py2.py3-none-any.whl (121 kB)
Collecting pandas
  Downloading pandas-1.1.5-cp36-cp36m-manylinux1_x86_64.whl (9.5 MB)
Collecting ipyevents
  Downloading ipyevents-2.0.1-py2.py3-none-any.whl (130 kB)
Collecting ipycanvas
  Downloading ipycanvas-0.9.0-py2.py3-none-any.whl (246 kB)
Requirement already satisfied: nbconvert in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter) (6.0.7)
Collecting jupyter-console
  Downloading jupyter_console-6.4.0-py3-none-any.whl (22 kB)
Collecting qtconsole
  Downloading qtconsole-5.1.1-py3-none-any.whl (119 kB)
Requirement already satisfied: notebook in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter) (6.4.4)
Requirement already satisfied: ipykernel in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter) (5.5.6)
Requirement already satisfied: ipython-genutils~=0.2.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (0.2.0)
Requirement already satisfied: nbformat>=4.2.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (5.1.3)
Requirement already satisfied: traitlets>=4.3.1 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (4.3.3)
Requirement already satisfied: ipython>=4.0.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipywidgets) (7.16.1)
Collecting widgetsnbextension~=3.5.0
  Downloading widgetsnbextension-3.5.1-py2.py3-none-any.whl (2.2 MB)
Collecting jupyterlab-widgets>=1.0.0
  Downloading jupyterlab_widgets-1.0.2-py3-none-any.whl (243 kB)
Requirement already satisfied: numpy>=1.15.4 in ./Slicer/lib/Python/lib/python3.6/site-packages (from pandas) (1.19.1)
Requirement already satisfied: python-dateutil>=2.7.3 in ./Slicer/lib/Python/lib/python3.6/site-packages (from pandas) (2.8.2)
Requirement already satisfied: pytz>=2017.2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from pandas) (2021.3)
Requirement already satisfied: pillow>=6.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipycanvas) (8.3.2)
Requirement already satisfied: tornado>=4.2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipykernel->jupyter) (6.1)
Requirement already satisfied: jupyter-client in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipykernel->jupyter) (7.0.6)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (3.0.20)
Requirement already satisfied: decorator in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (5.1.0)
Requirement already satisfied: setuptools>=18.5 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (49.2.0)
Requirement already satisfied: jedi>=0.10 in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (0.18.0)
Requirement already satisfied: pygments in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (2.10.0)
Requirement already satisfied: pickleshare in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (0.7.5)
Requirement already satisfied: backcall in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (0.2.0)
Requirement already satisfied: pexpect in ./Slicer/lib/Python/lib/python3.6/site-packages (from ipython>=4.0.0->ipywidgets) (4.8.0)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jedi>=0.10->ipython>=4.0.0->ipywidgets) (0.8.2)
Requirement already satisfied: jupyter-core in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbformat>=4.2.0->ipywidgets) (4.8.1)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbformat>=4.2.0->ipywidgets) (3.2.0)
Requirement already satisfied: six>=1.11.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (1.15.0)
Requirement already satisfied: attrs>=17.4.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (21.2.0)
Requirement already satisfied: pyrsistent>=0.14.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (0.18.0)
Requirement already satisfied: importlib-metadata in ./Slicer/lib/Python/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (4.8.1)
Requirement already satisfied: wcwidth in ./Slicer/lib/Python/lib/python3.6/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=4.0.0->ipywidgets) (0.2.5)
Requirement already satisfied: prometheus-client in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (0.11.0)
Requirement already satisfied: terminado>=0.8.3 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (0.12.1)
Requirement already satisfied: pyzmq>=17 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (22.3.0)
Requirement already satisfied: jinja2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (3.0.2)
Requirement already satisfied: Send2Trash>=1.5.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (1.8.0)
Requirement already satisfied: argon2-cffi in ./Slicer/lib/Python/lib/python3.6/site-packages (from notebook->jupyter) (21.1.0)
Requirement already satisfied: nest-asyncio>=1.5 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter-client->ipykernel->jupyter) (1.5.1)
Requirement already satisfied: entrypoints in ./Slicer/lib/Python/lib/python3.6/site-packages (from jupyter-client->ipykernel->jupyter) (0.3)
Requirement already satisfied: ptyprocess in ./Slicer/lib/Python/lib/python3.6/site-packages (from terminado>=0.8.3->notebook->jupyter) (0.7.0)
Requirement already satisfied: cffi>=1.0.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from argon2-cffi->notebook->jupyter) (1.14.6)
Requirement already satisfied: pycparser in ./Slicer/lib/Python/lib/python3.6/site-packages (from cffi>=1.0.0->argon2-cffi->notebook->jupyter) (2.20)
Requirement already satisfied: zipp>=0.5 in ./Slicer/lib/Python/lib/python3.6/site-packages (from importlib-metadata->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (3.6.0)
Requirement already satisfied: typing-extensions>=3.6.4 in ./Slicer/lib/Python/lib/python3.6/site-packages (from importlib-metadata->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (3.10.0.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from jinja2->notebook->jupyter) (2.0.1)
Requirement already satisfied: defusedxml in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.7.1)
Requirement already satisfied: jupyterlab-pygments in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.1.2)
Requirement already satisfied: bleach in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (4.1.0)
Requirement already satisfied: pandocfilters>=1.4.1 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (1.5.0)
Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.5.4)
Requirement already satisfied: mistune<2,>=0.8.1 in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.8.4)
Requirement already satisfied: testpath in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbconvert->jupyter) (0.5.0)
Requirement already satisfied: async-generator in ./Slicer/lib/Python/lib/python3.6/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->jupyter) (1.10)
Requirement already satisfied: packaging in ./Slicer/lib/Python/lib/python3.6/site-packages (from bleach->nbconvert->jupyter) (20.4)
Requirement already satisfied: webencodings in ./Slicer/lib/Python/lib/python3.6/site-packages (from bleach->nbconvert->jupyter) (0.5.1)
Requirement already satisfied: pyparsing>=2.0.2 in ./Slicer/lib/Python/lib/python3.6/site-packages (from packaging->bleach->nbconvert->jupyter) (2.4.7)
Collecting qtpy
  Downloading QtPy-1.11.2-py2.py3-none-any.whl (58 kB)
Installing collected packages: widgetsnbextension, qtpy, jupyterlab-widgets, qtconsole, jupyter-console, ipywidgets, pandas, jupyter, ipyevents, ipycanvas
Successfully installed ipycanvas-0.9.0 ipyevents-2.0.1 ipywidgets-7.6.5 jupyter-1.0.0 jupyter-console-6.4.0 jupyterlab-widgets-1.0.2 pandas-1.1.5 qtconsole-5.1.1 qtpy-1.11.2 widgetsnbextension-3.5.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Enabling notebook extension jupyter-js-widgets/extension...
      - Validating: OK
Enabling notebook extension ipyevents/extension...
      - Validating: OK
QIODevice::read (QFile, "/home/sliceruser/.config/NA-MIC/Extensions-29402/SlicerJupyter/share/Slicer-4.11/qt-loadable-modules/JupyterKernel/Slicer-4.11/kernel-template.json"): device not open
Installed kernelspec slicer-4.11 in /home/sliceruser/.local/share/jupyter/kernels/slicer-4.11
Info: In /work/Stable/Slicer-0/Libs/MRML/Core/vtkMRMLScene.cxx, line 316
vtkMRMLScene (0x7f1e2c006bb0): vtkMRMLScene::Clear

./install.sh: line 65:    12 Killed                  Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config $HOME/xorg.conf $DISPLAY
Removing intermediate container 977d68a048d7
 ---> 76197f5f2739
Step 30/39 : EXPOSE $VNCPORT $JUPYTERPORT
 ---> Running in 33e01f22ed66
Removing intermediate container 33e01f22ed66
 ---> 409da20bed31
Step 31/39 : COPY run.sh .
 ---> 3e8a35a5759e
Step 32/39 : ENTRYPOINT ["/home/sliceruser/run.sh"]
 ---> Running in d5f6a6123092
Removing intermediate container d5f6a6123092
 ---> 5f7f2ffb40bf
Step 33/39 : CMD ["sh", "-c", "./Slicer/bin/PythonSlicer -m jupyter notebook --port=$JUPYTERPORT --ip=0.0.0.0 --no-browser"]
 ---> Running in e44befc5f5fa
Removing intermediate container e44befc5f5fa
 ---> 8512088fbe44
Step 34/39 : COPY .slicerrc.py .
 ---> 28a831f1c33e
Step 35/39 : ARG BUILD_DATE
 ---> Running in b89aa4eec8a1
Removing intermediate container b89aa4eec8a1
 ---> ade34fb25f56
Step 36/39 : ARG IMAGE
 ---> Running in d19b65ba9484
Removing intermediate container d19b65ba9484
 ---> 3544903e17a5
Step 37/39 : ARG VCS_REF
 ---> Running in cb5dc40df454
Removing intermediate container cb5dc40df454
 ---> c132883705b9
Step 38/39 : ARG VCS_URL
 ---> Running in 05ab89cc518e
Removing intermediate container 05ab89cc518e
 ---> 33bea1e7b86c
Step 39/39 : LABEL org.label-schema.build-date=$BUILD_DATE       org.label-schema.name=$IMAGE       org.label-schema.vcs-ref=$VCS_REF       org.label-schema.vcs-url=$VCS_URL       org.label-schema.schema-version="1.0"
 ---> Running in 3c740ff01fda
Removing intermediate container 3c740ff01fda
 ---> dc83a1646339
Successfully built dc83a1646339
Successfully tagged dazzag24/slicer-notebook:4.11

@lassoan
Copy link
Contributor

lassoan commented Oct 8, 2021

Nice progress!

It would be great if you could try to build the image using latest Slicer Preview Release (rev 30304) and the corresponding SlicerJupyter extension package that I've built today. We have made many improvement and fixes since Slicer-4.11.20200930.

@dazzag24
Copy link

dazzag24 commented Oct 8, 2021

Hi

The first stack trace in my last post from last night was from the 4.13 Slicer Preview Release (rev 30304) using your custom built package of SlicerJupyter. Basically the 4.13 docker build fails with:

The command '/bin/sh -c ./install.sh ${HOME}/Slicer/Slicer && rm ${HOME}/install.sh' returned a non-zero code: 127

Extracting the relevant section the 4.11 trace looks like this:

Install SlicerJupyter extension
QStandardPaths: wrong permissions on runtime directory /tmp/runtime-sliceruser, 7755 instead of 7700
extensionMetaData: {'arch': 'amd64', 'archivename': '29402_SlicerJupyter_linux_amd64_616aa24.tar.gz', 'category': 'Developer Tools', 'contributors': '', 'date_creation': '2021-06-03T05:17:13.997000+00:00', 'description': 'This extension provides a Jupyter kernel, which allows running Jupyter notebooks in 3D Slicer.', 'enabled': '1', 'extension_id': '60b865d93987204c4bf545b0', 'extensionname': 'SlicerJupyter', 'homepage': 'https://github.com/Slicer/SlicerJupyter', 'iconurl': 'https://raw.githubusercontent.com/Slicer/SlicerJupyter/master/SlicerJupyterLogo.png', 'item_id': '60b865d93987204c4bf545b0', 'os': 'linux', 'revision': '616aa24', 'scm': 'git', 'scmurl': 'https://github.com/Slicer/SlicerJupyter.git', 'screenshots': 'https://raw.githubusercontent.com/NA-MIC/ProjectWeek/master/PW28_2018_GranCanaria/Projects/SlicerJupyter/NotebookOnly.png https://raw.githubusercontent.com/NA-MIC/ProjectWeek/master/PW28_2018_GranCanaria/Projects/SlicerJupyter/NotebookSideBySide.png https://raw.githubusercontent.com/NA-MIC/ProjectWeek/master/PW28_2018_GranCanaria/Projects/SlicerJupyter/JupyterLab.png', 'slicer_revision': '29402'}
itemId: 60b865d93987204c4bf545b0 url: http://slicer.kitware.com/midas3/download?items=60b865d93987204c4bf545b0
Downloading from
  http://slicer.kitware.com/midas3/download?items=60b865d93987204c4bf545b0
as file
  /tmp/Slicer-/60b865d93987204c4bf545b0
It may take a few minutes...
"Installed extension SlicerJupyter revision 616aa24"
Info: In /work/Stable/Slicer-0/Libs/MRML/Core/vtkMRMLScene.cxx, line 316
vtkMRMLScene (0x1cc2fc0): vtkMRMLScene::Clear

Install Jupyter server (in Slicer's Python environment) and Slicer Jupyter kernel

whereas the 4.13 build seems to fail somewhere in the "Installed extension SlicerJupyter revision" stage and then install.sh as a whole errors with a non zero return value.

Install SlicerJupyter extension
extensionMetaData: {}
Using bespoke build from {url} until https://github.com/Slicer/SlicerJupyter/issues/59 is fixed
Downloading from
  https://github.com/Slicer/SlicerJupyter/files/7305919/30304-linux-amd64-SlicerJupyter-gitb3fba2d-2021-03-21.tar.gz
as file
  /tmp/Slicer-/30304-linux-amd64-SlicerJupyter-gitb3fba2d-2021-03-21.tar.gz
It may take a few minutes...
Installed extension SlicerJupyter revision b3fba2d
Install Jupyter server (in Slicer's Python environment) and Slicer Jupyter kernel

@sjh26
Copy link

sjh26 commented Oct 8, 2021

I temporarily switched the linux factory to the gcc7 image, and the build results look good on linux:

https://slicer.cdash.org/index.php?project=SlicerPreview&date=2021-10-08&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=Jupyter

I will finalize the switch today. I will then start testing with a gcc9 image to see if we can make that change as well in the near future

@lassoan
Copy link
Contributor

lassoan commented Oct 8, 2021

This is awesome, I've just tested this SlicerJupyter on Linux and it works!

@dazzag24
Copy link

dazzag24 commented Oct 8, 2021

@sjh26 Sounds good. I should note however that the package that @lassoan built manually last night has not successfully deployed with the Dockerfile. There is a chance I am installing it incorrectly?

@lassoan
Copy link
Contributor

lassoan commented Oct 8, 2021

I should note however that the package that @lassoan built manually last night has not successfully deployed with the Dockerfile. There is a chance I am installing it incorrectly?

This was kind of expected. There is always a risk of ABI incompatibility when you build libraries on different computers with different compilers. It was worth a shot, but it did not work out.

However, with the very latest (today's) Slicer Preview Release, SlicerJupyter is available in the extension manager. It is the official build, ABI compatibility is guaranteed.

@dazzag24
Copy link

dazzag24 commented Oct 8, 2021

@lassoan Hi, I can confirm this works now. Please see my PR Slicer/SlicerDocker#46 for the changes that were needed to make the Dockerfile build work again.

@lassoan lassoan closed this as completed Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants