Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ADD: ubuntu 18.04 and centos 6.9 dockerfiles #1372
This PR proposes adding specifications to build MRtrix Docker images. Containerization will make installation easier for some users, especially on HPC.
Two Dockerfiles are included in this PR. The file
This Ubuntu 18.04 image would be built as follows:
$ git clone firstname.lastname@example.org:MRtrix3/mrtrix3.git $ cd mrtrix3 $ docker build --tag=mrtrix3 .
The Centos 6.9 Docker image would built as follows
$ git clone email@example.com:MRtrix3/mrtrix3.git $ cd mrtrix3 $ docker build --tag=mrtrix3-build -f Dockerfile.centos6 . $ docker run --rm -it mrtrix3-build [in-container]$ ./configure -nogui -static [in-container]$ ./build [in-container]$ cd .. [in-container]$ tar czf mrtrix3.tar.gz mrtrix3
Thanks for this, I'm sure it'll be appreciated by users out there (there's already one request on the forum). It's also been suggested before in #446, and we'd already agreed it would be good back then, so it's high time we did something about it...
Unfortunately, I'm not sufficiently familiar with docker to really review this, but hopefully some of the other team members will be happy to give it the thumbs-up. I'm personally all for this, with my only concern being one of ongoing support (since I'm not familiar enough with the technology to commit to maintaining it). Is this something you're happy to keep up to date when required...?
Strictly speaking, this should go into the
Thanks for the PR. I've had a little experience with Docker now from developing my BIDS App, so I can help with getting this through; I just want to raise a couple of options, and I have a couple of other post-ISMRM priorities I need to churn through first.
@kaczmarj Thanks for the docker files! I am quite new to docker so bear with me if this is obvious. I tried to run mrview from the ubuntu image but can not get mrview to display. Host is ubuntu 16.04.
Also, I think the first line of your centos instructions should read
@Lestropie - Here are my responses to each of your points.
It can sometimes be tricky to run a GUI through a container. The following works on Linux (Debian testing). I was not able to get this to work on macOS. @maxpietsch - this should answer your question. (And thank you — I will make that edit to the
$ xhost +local:root # allow non-network local display connections # When running the container, set the DISPLAY variable and mount the tmp X11 path. $ docker run --rm -it \ -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ -e DISPLAY=$DISPLAY \ mrtrix_container mrview $ xhost -local:root # revert permissions
I did not realize this. FSL can definitely be installed in the container. In this case, I would opt to use a NeuroDebian base Docker image, install FSL through NeuroDebian, and then compile MRtrix3.
Yes, it would be good for the tagged containers on DockerHub to mirror MRtrix3 version. But those containers do not have to be uploaded immediately. With a
I omitted the GUI components because I did not have time to delve into the Qt installation on Centos 6 (though here is Qt's documentation on this). I don't think there are any fundamental limitations. One consideration is that Qt might have to be statically compiled to be part of static MRtrix binaries. If that is not the case, we could include the Qt libraries in the release tarball. I believe FreeSurfer does this.
My intended use case of the Centos 6 container would be to compile MRtrix on an old system, so the binaries could be used on most current Linux distributions. In #902 I think there was talk of compiling several releases for different Linux distributions, but that might not be necessary.
The containers can be built in TravisCI (they have good support for Docker). At the very least, CI can build the containers. But a more complete testing could include running MRtrix3's tests inside the container.
mrview crashes on ubuntu 16.04 as host:
@Lestropie - maybe instead of statically compiling MRtrix3 in the CentOS 6 docker container, we dynamically compile and then package with
@maxpietsch - I'm not sure why that is happening. I will try to debug on Ubuntu 16.04.