ReproNim / neurodocker

Generate custom Docker and Singularity images, and minimize existing containers
https://www.repronim.org/neurodocker/
Apache License 2.0
326 stars 97 forks source link

libaries missing for fslview and fsleyes to work #191

Closed stebo85 closed 1 year ago

stebo85 commented 6 years ago

Dear Jakub,

I used neurodocker version 0.4.0 to build --fsl version=5.0.11 with base debian:wheezy and fslview and fsleyes don't work due to missing libraries. I had to add these to make it work:

--install libdbus-glib-1-2 libjpeg62 libgtk2.0-0 libpng12-0 \

Not sure if this also affects other base images or how you handle different package names for different base images.

Thank you for working on neurodocker :)

Best Steffen

kaczmarj commented 6 years ago

hi @stebo85 - thanks for letting me know. i intentionally left out the dependencies for gui programs because i thought that in the vast majority of cases, these containers would be used for non-gui purposes (it can sometimes be tricky to run a gui through a container). but it seems i was wrong!

libpng12-0 is not in the debian stretch or ubuntu 18.04 repositories, so including it would cause an error if trying to build on those base images. i can look into whether fsl can use libpng16, the version available in stretch and 18.04.

it would also be good to find the corresponding libraries for base images that use yum and not apt-get.

i can look into this, but it will take me several days. feel free to submit a pull request with changes, and thank you again for bringing this to my attention!

stebo85 commented 6 years ago

Dear @kaczmarj

I found the GUI versions to work very nicely in singularity images, but maybe not many people are using this, so it is reasonable to not spend too much time on this for neurodocker, as it seems to be quite a pain to get it working.

I tried to find a solution and it looks like libpng12-0 is not yet in debian stretch, but could be (http://forums.debian.net/viewtopic.php?f=10&t=130905) - so maybe this problem solves itself in the future. However, this library is only needed for the deprecated fslview, so maybe it is ok to ignore this and focus on the new fsleyes then? So, I tried to get fsleys to work, but I can only get it to work in Wheezy and not in Stretch, where I have problems with ZLIB (ImportError: /opt/fsl-5.0.11/bin/FSLeyes/libz.so.1: version `ZLIB_1.2.3.4' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)) that I currently can't solve.

The yum baseimages look better and it only needed gtk2 to get fslview it to work, but fsleyes fails with ImportError: /lib64/libharfbuzz.so.0: undefined symbol: FT_Reference_Face in Centos:7 - maybe a newer baseimage would help?

It all works fine in Wheezy - so I am using this for now for my own images and add the libraries manually. I guess it is not worth a pull request as it still doesn't work consistently across all base images and needs a lot more thought :/

kaczmarj commented 6 years ago

I tried running FSLeyes on debian stretch and also ran into the libz.so.1 error. to my naive eye, it looks like libpng16.so.16 is somehow dynamically linking to the libz that fsl packages, instead of the system's libz. my bet is that if it dynamically linked to the system's libz, that error would go away.

regarding the error withFT_Reference_Face, centos:7 is the latest version of centos. in fact, it might work if you go to centos:6. when a user requests fsl with --fsl, neurodocker downloads the pre-compiled fsl binaries hosted on fsl's website. those binaries are compiled on centos 5 (now end-of-lifed) or centos 6. i chose to use these because they should work on most newer systems. but as we see here, the gui pieces don't work.

at the very least, we can add an example in the examples directory to show users how to get fsleyes to work in a container. i'd welcome a PR for this if you're up for it!

bkossows commented 5 years ago

Hi, I tried docker run --rm kaczmarj/neurodocker:0.4.3 generate docker --base debian:stretch --pkg-manager apt --fsl version=5.0.11 --vnc passwd=fsl start_at_runtime=true | docker build - to b build FSL container with graphical interface. There is still smth missing to run fsleyes - libgtk-x11-2.0.so.0. Could You please make it fully usable? I also work with DTI data and it would be great having eddy (eddy-non-free?) onboard. B.

kaczmarj commented 5 years ago

I responded in https://github.com/kaczmarj/neurodocker/issues/254#issuecomment-454912565 regarding how to run fsl gui applications in containers. I highly recommend installing these from neurodebian.

djarecka commented 1 year ago

I believe this was answered, but please feel free to reopen