Donders-Institute / bidscoin

BIDScoin converts your source-level neuroimaging data to BIDS
https://bidscoin.readthedocs.io
GNU General Public License v3.0
129 stars 35 forks source link

[BUG] apptainer can't open bidsmapper GUI - missing dependency #242

Open bcmcpher opened 1 week ago

bcmcpher commented 1 week ago

I followed the instructions here for using bidsmapper from a singularity container. However, I receive the following error:

INFO | Opening the bidseditor
qt.qpa.theme.dbus: Session DBus not running.
qt.qpa.theme.dbus: Application will not react to setting changes.
 Check your DBus installation.
dbus[114563]: D-Bus library appears to be incorrectly set up: see the manual page for dbus-uuidgen to correct this issue. (Failed to open "/var/lib/dbus/machine-id": No such file or directory; Failed to open "/etc/machine-id": No such file or directory)
  D-Bus not built with -rdynamic so unable to print a backtrace

To reproduce: Follow the tutorial instructions on the website in a clean environment.

> apptainer build bidscoin.sif docker://marcelzwiers/bidscoin:4.4.0  # results are the same with sudo
> xhost +
> apptainer exec bidscoin.sif bidsmapper dicom/ bids/

Expected behavior: bidsmapper GUI should open

Software version

Potential Fix: If I set export QT_DEBUG_PLUGINS=1, I get a verbose log, with the only obvious error being:

qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/opt/miniconda-latest/lib/python3.12/site-packages/PyQt6/Qt6/plugins/platformthemes/libqgtk3.so" : "Cannot load library /opt/miniconda-latest/lib/python3.12/site-packages/PyQt6/Qt6/plugins/platformthemes/libqgtk3.so: libgtk-3.so.0: cannot open shared object file: No such file or directory"

I was unable to bind libqgtk3.so into that location from my host, but if I did a --sandbox build of the container, I was able to run apt install libqgtk-3-0, which added some dependencies. With those additional libraries I was able to launch the bidsmapper GUI.

I believe adding libqgtk-3-0 to the build instructions as part of the conda environment or w/ apt will fix this issue.

marcelzwiers commented 2 days ago

That's strange, because it ran without issue on my Linux test VM. Maybe there has been an update of some dependency, causing this issue, I will have a look

marcelzwiers commented 1 day ago

I did what you described to reproduce the issue, but my test ran normally:

$ apptainer exec bidscoin.sif bidscoin -t
INFO | --------- Testing the BIDScoin's core functionality ---------
INFO | Running bidsmap checks:
INFO | Reading: /home/marzwi/.bidscoin/4.4.0/templates/bidsmap_dccn.yaml
INFO | Checking the bidsmap run-items:
VERBOSE | Could not validate every run-item in the bidsmap
VERBOSE | Checking the template bidsmap datatypes:
SUCCESS | All datatypes and options in the template bidsmap are valid
INFO | Testing the PyQt GUI setup:
qt.qpa.theme.dbus: Session DBus not running.
qt.qpa.theme.dbus: Application will not react to setting changes.
 Check your DBus installation.
SUCCESS | The GUI seems to work OK
INFO | Testing the DRMAA setup:
WARNING | The DRMAA library could not be imported. This is OK if you want to run pydeface locally and not use the option to distribute jobs on a compute cluster
Could not find drmaa library.  Please specify its full path using the environment variable DRMAA_LIBRARY_PATH
INFO | Executable BIDScoin tools:
INFO | - bidscoin
INFO | - bidscoiner
INFO | - bidseditor
INFO | - bidsmapper
INFO | - bidsparticipants
INFO | - deface
INFO | - dicomsort
INFO | - echocombine
INFO | - fixmeta
INFO | - medeface
INFO | - physio2tsv
INFO | - plotphysio
INFO | - rawmapper
INFO | - skullstrip
INFO | - slicereport
INFO | Installed template bidsmaps (/home/marzwi/.bidscoin/4.4.0/templates):
INFO | - bidsmap_bids2bids
INFO | - bidsmap_dccn (default)
INFO | - bidsmap_sst
INFO | Installed plugins (/home/marzwi/.bidscoin/4.4.0/plugins):
INFO | - dcm2niix2bids
INFO | - nibabel2bids
INFO | - spec2nii2bids
INFO | --------- Testing the 'dcm2niix2bids' plugin ---------
INFO | Testing the dcm2niix2bids installation:
VERBOSE | Command:
dcm2niix -v
VERBOSE | Output:
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC12.2.0 x86-64 (64-bit Linux)
v1.0.20240202

SUCCESS | The 'dcm2niix2bids' plugin functioned correctly
INFO | --------- Testing the 'nibabel2bids' plugin ---------
INFO | Testing the nibabel2bids installation:
INFO | Nibabel version: 5.2.1
SUCCESS | The 'nibabel2bids' plugin functioned correctly
INFO | --------- Testing the 'spec2nii2bids' plugin ---------
INFO | Testing the spec2nii2bids installation:
VERBOSE | Command:
spec2nii -v
VERBOSE | Output:
0.8.4

SUCCESS | The 'spec2nii2bids' plugin functioned correctly
SUCCESS | All tests finished successfully :-)