frankyeh / DSI-Studio

A Tractography Tool for Diffusion MRI
http://dsi-studio.labsolver.org
Other
118 stars 54 forks source link

Docker Ubuntu 18.04 #47

Closed AndrewYRevell closed 3 years ago

AndrewYRevell commented 3 years ago

Hi Frank,

First, thank you so much for your efforts in creating and maintaining DSI Studio. I am currently writing a paper for my PhD and centralizing all my computational pipelines into a single Docker image (and then build a Singularity image to run on our cluster). DSI Studio is a part of this pipeline. It would be nice to have all required software and dependencies in a single image. The problem is that the image is built on Ubuntu 18.04 and it seems the newer versions of DSI Studio installations is giving me problems - I believe in relation to Qt 5.12.

I'll be honest and say I do not understand everything about Qt, nor do I have complete knowledge of installing dependencies (like apt-get lib* files) in Dockerfiles. The Dockerfile you have on your GitHub works fine as is, but when I try to build under Ubuntu 18.04, I specifically have problems with the Dockerfile:

(line 44) RUN add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial \

Where it seems this repository does not exist. I have made a container without DSI Studio and then tried installing it in the container itself through your recommendation link of http://www.nemotos.net/?p=1878. I hoped to back-track a Dockerfile recipe through this method.

I just cannot get it to work. Qt seems to be such an issue, possibly with installing in a Docker image itself - which is unfortunate because I only use DSI Studio through command line and have no need for a GUI

Things I have tried:

  1. Build a single Docker image under Ubuntu 16.04 instead, however my other software installations do not work.
  2. Switching my pipeline to python's Dipy, however, I cannot reproduce the streamlines/tractography files for connectivity analysis. I may be able to figure it out, but I am not as familiar with Dipy, nor does our lab have a history of using it. Our lab has previous publications using DSI Studio, so we have generally a better understanding of it and would like to keep using it

Moving forward, I think I have two options

  1. Build the Docker image under an older version of DSI Studio. My previous Docker images I have kept alive for the last year works with DSI Studio under Ubuntu 18.04. But it had installed it with the current version of DSI Studio at that time. I will see if I can alter the Dockerfile to build a version from a year ago
  2. Have separate Docker images. One for DSI Studio part of the pipeline. And one for everything else. This is not necessarily ideal, as I hoped to have one Docker image associated with the paper to facilitate reproducibility of my study.

This is not a huge deal. But I just wanted to bring up this issue since I have spent quite a few days full time figuring this out. So the issue is really with Lines 44-52 of the Dockerfile to be built under Ubuntu 18.04. I am just wondering why this Qt 5.12 repository does not exist in Ubuntu 18.04 but it does in 16.04?

frankyeh commented 3 years ago

Hi Andy,

I am not using Ubuntu, and one of the users helped me figured out the

Docker. Here's the docker file that is working on docker hub. Hope this helps/

Best, Frank

Use Ubuntu 16.04 LTS FROM ubuntu:16.04 # Prepare environment RUN apt-get

update && \ apt-get install -y --no-install-recommends \ curl \ ca-certificates \ xvfb \ build-essential \ autoconf \ libtool \ pkg-config \ libfontconfig1 \ libfreetype6 \ libgl1-mesa-dev \ libglu1-mesa-dev \ libgomp1 \ libice6 \ libxcursor1 \ libxft2 \ libxinerama1 \ libxrandr2 \ libxrender1 \ libxt6 \ wget \ libboost-all-dev \ zlib1g \ zlib1g-dev \ unzip \ libgl1-mesa-dev \ libglu1-mesa-dev \ freeglut3-dev \ mesa-utils \ g++ \ gcc \ make \ zlib1g-dev \ git \ software-properties-common && \ apt-get clean && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/ # Get newer qt5 RUN add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial \ && apt-get update \ && apt install -y --no-install-recommends \ freetds-common libclang1-5.0 libllvm5.0 libodbc1 libsdl2-2.0-0 libsndio6.1 \ libsybdb5 libxcb-xinerama0 qt5123d qt512base qt512canvas3d \ qt512connectivity qt512declarative qt512graphicaleffects \ qt512imageformats qt512location qt512multimedia qt512scxml qt512svg \ qt512wayland qt512x11extras qt512xmlpatterns qt512charts-no-lgpl \ && apt-get clean && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/ # Install DSI Studio ENV QT_BASE_DIR= "/opt/qt512" ENV QTDIR="$QT_BASE_DIR" \ PATH= "$QT_BASE_DIR/bin:$PATH:/opt/dsi-studio/dsi_studio_64" \ LD_LIBRARY_PATH= "$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH" \ PKG_CONFIG_PATH="$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH" RUN mkdir /opt/dsi-studio \ && cd /opt/dsi-studio \ && git clone https://github.com/frankyeh/DSI-Studio.git \ && mv DSI-Studio src \ && git clone https://github.com/frankyeh/TIPL.git \ && mv TIPL src/tipl \ && mkdir build && cd build \ && /opt/qt512/bin/qmake ../src && make \ && cd /opt/dsi-studio \ && curl -sSLO ' https://pitt.box.com/shared/static/n3ln8k7bakr7y5p0ekm3g4s0ucdmqkia.zip' \ && unzip n3ln8k7bakr7y5p0ekm3g4s0ucdmqkia.zip \ && rm n3ln8k7bakr7y5p0ekm3g4s0ucdmqkia.zip \ && cd dsi_studio_64 \ && rm .dll \ && rm .exe \ && rm -rf iconengines \ && rm -rf imageformats \ && rm -rf platforms \ && rm -rf styles \ && mv ../build/dsi_studio . \ && rm -rf /opt/dsi-studio/src /opt/dsi-studio/build

On Sun, Aug 16, 2020 at 12:48 PM Andy Revell notifications@github.com wrote:

Hi Frank,

First, thank you so much for your efforts in creating and maintaining DSI Studio. I am currently writing a paper for my PhD and centralizing all my computational pipelines into a single Docker image (and then build a Singularity image to run on our cluster). DSI Studio is a part of this pipeline. It would be nice to have all required software and dependencies in a single image. The problem is that the image is built on Ubuntu 18.04 and it seems the newer versions of DSI Studio installations is giving me problems - I believe in relation to Qt 5.12.

I'll be honest and say I do not understand everything about Qt, nor do I have complete knowledge of installing dependencies (like apt-get lib* files) in Dockerfiles. The Dockerfile you have on your GitHub works fine as is, but when I try to build under Ubuntu 18.04, I specifically have problems with the Dockerfile:

(line 44) RUN add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial \

Where it seems this repository does not exist. I have made a container without DSI Studio and tried figure out a Dockerfile recipe by installing it through your recommendation link of http://www.nemotos.net/?p=1878

I just cannot get it to work. Qt seems to be such an issue, possibly with installing in a Docker image itself - which is unfortunate because I only use DSI Studio through command line and have no need for a GUI

Things I have tried:

  1. Build a single Docker image under Ubuntu 16.04 instad, however my other software installations do not work.
  2. Switching my pipeline to python's Dipy, however, I cannot reproduce the streamlines/tractography files for connectivity analysis. I may be able to figure it out, but I am not as familiar with Dipy, nor does our lab have a history of using it. Our lab has previous publications using DSI Studio, so we have generally a better understanding of it and would like to keep using it

Moving forward, I think I have two options

  1. Build the Docker image under an older version of DSI Studio. My previous Docker images I have kept alive for the last year works with DSI Studio under Ubuntu 18.04. But it had installed it with the current version of DSI Studio at that time. I will see if I can alter the Dockerfile to build a version from a year ago
  2. Have separate Docker images. One for DSI Studio part of the pipeline. And one for everything else. This is not necessarily ideal, as I hoped to have one Docker image associated with the paper to facilitate reproducibility of my study.

This is not a huge deal. But I just wanted to bring up this issue since I have spent quite a few days full time figuring this out. So the issue is really with Lines 44-52 of the Dockerfile to be built under Ubuntu 18.04. I am just wondering why this Qt 5.12 repository does not exist in Ubuntu 18.04 but it does in 16.04?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/47, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDI4LVT6KYMUZP4LTTTODSBAEWNANCNFSM4QA5IFJA .

frankyeh commented 3 years ago

For other questions, I am very sorry that I don't have a clue. Best regards, Frank

On Sun, Aug 16, 2020 at 1:16 PM Fang-Cheng Yeh frank.yeh@gmail.com wrote:

Hi Andy,

I am not using Ubuntu, and one of the users helped me figured out the

Docker. Here's the docker file that is working on docker hub. Hope this helps/

Best, Frank

Use Ubuntu 16.04 LTS FROM ubuntu:16.04 # Prepare environment RUN

apt-get update && \ apt-get install -y --no-install-recommends \ curl \ ca-certificates \ xvfb \ build-essential \ autoconf \ libtool \ pkg-config \ libfontconfig1 \ libfreetype6 \ libgl1-mesa-dev \ libglu1-mesa-dev \ libgomp1 \ libice6 \ libxcursor1 \ libxft2 \ libxinerama1 \ libxrandr2 \ libxrender1 \ libxt6 \ wget \ libboost-all-dev \ zlib1g \ zlib1g-dev \ unzip \ libgl1-mesa-dev \ libglu1-mesa-dev \ freeglut3-dev \ mesa-utils \ g++ \ gcc \ make \ zlib1g-dev \ git \ software-properties-common && \ apt-get clean && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/ # Get newer qt5 RUN add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial \ && apt-get update \ && apt install -y --no-install-recommends \ freetds-common libclang1-5.0 libllvm5.0 libodbc1 libsdl2-2.0-0 libsndio6.1 \ libsybdb5 libxcb-xinerama0 qt5123d qt512base qt512canvas3d \ qt512connectivity qt512declarative qt512graphicaleffects \ qt512imageformats qt512location qt512multimedia qt512scxml qt512svg \ qt512wayland qt512x11extras qt512xmlpatterns qt512charts-no-lgpl \ && apt-get clean && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/ # Install DSI Studio ENV QT_BASE_DIR="/opt/qt512" ENV QTDIR="$QT_BASE_DIR" \ PATH= "$QT_BASE_DIR/bin:$PATH:/opt/dsi-studio/dsi_studio_64" \ LD_LIBRARY_PATH= "$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH" \ PKG_CONFIG_PATH="$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH" RUN mkdir /opt/dsi-studio \ && cd /opt/dsi-studio \ && git clone https://github.com/frankyeh/DSI-Studio.git \ && mv DSI-Studio src \ && git clone https://github.com/frankyeh/TIPL.git \ && mv TIPL src/tipl \ && mkdir build && cd build \ && /opt/qt512/bin/qmake ../src && make \ && cd /opt/dsi-studio \ && curl -sSLO ' https://pitt.box.com/shared/static/n3ln8k7bakr7y5p0ekm3g4s0ucdmqkia.zip' \ && unzip n3ln8k7bakr7y5p0ekm3g4s0ucdmqkia.zip \ && rm n3ln8k7bakr7y5p0ekm3g4s0ucdmqkia.zip \ && cd dsi_studio_64 \ && rm .dll \ && rm .exe \ && rm -rf iconengines \ && rm -rf imageformats \ && rm -rf platforms \ && rm -rf styles \ && mv ../build/dsi_studio . \ && rm -rf /opt/dsi-studio/src /opt/dsi-studio/build

On Sun, Aug 16, 2020 at 12:48 PM Andy Revell notifications@github.com wrote:

Hi Frank,

First, thank you so much for your efforts in creating and maintaining DSI Studio. I am currently writing a paper for my PhD and centralizing all my computational pipelines into a single Docker image (and then build a Singularity image to run on our cluster). DSI Studio is a part of this pipeline. It would be nice to have all required software and dependencies in a single image. The problem is that the image is built on Ubuntu 18.04 and it seems the newer versions of DSI Studio installations is giving me problems - I believe in relation to Qt 5.12.

I'll be honest and say I do not understand everything about Qt, nor do I have complete knowledge of installing dependencies (like apt-get lib* files) in Dockerfiles. The Dockerfile you have on your GitHub works fine as is, but when I try to build under Ubuntu 18.04, I specifically have problems with the Dockerfile:

(line 44) RUN add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial \

Where it seems this repository does not exist. I have made a container without DSI Studio and tried figure out a Dockerfile recipe by installing it through your recommendation link of http://www.nemotos.net/?p=1878

I just cannot get it to work. Qt seems to be such an issue, possibly with installing in a Docker image itself - which is unfortunate because I only use DSI Studio through command line and have no need for a GUI

Things I have tried:

  1. Build a single Docker image under Ubuntu 16.04 instad, however my other software installations do not work.
  2. Switching my pipeline to python's Dipy, however, I cannot reproduce the streamlines/tractography files for connectivity analysis. I may be able to figure it out, but I am not as familiar with Dipy, nor does our lab have a history of using it. Our lab has previous publications using DSI Studio, so we have generally a better understanding of it and would like to keep using it

Moving forward, I think I have two options

  1. Build the Docker image under an older version of DSI Studio. My previous Docker images I have kept alive for the last year works with DSI Studio under Ubuntu 18.04. But it had installed it with the current version of DSI Studio at that time. I will see if I can alter the Dockerfile to build a version from a year ago
  2. Have separate Docker images. One for DSI Studio part of the pipeline. And one for everything else. This is not necessarily ideal, as I hoped to have one Docker image associated with the paper to facilitate reproducibility of my study.

This is not a huge deal. But I just wanted to bring up this issue since I have spent quite a few days full time figuring this out. So the issue is really with Lines 44-52 of the Dockerfile to be built under Ubuntu 18.04. I am just wondering why this Qt 5.12 repository does not exist in Ubuntu 18.04 but it does in 16.04?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/47, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDI4LVT6KYMUZP4LTTTODSBAEWNANCNFSM4QA5IFJA .

frankyeh commented 3 years ago

The recent commit addressed this issue for Ubuntu 18.04 and 20.04 https://github.com/frankyeh/DSI-Studio/commit/2768745ba4dd41f096ac342c6eaedf1ccb824a46