Skip to content

Commit

Permalink
Merge pull request #40 from SRI-RSST/dev-branch
Browse files Browse the repository at this point in the history
Updated Dockerfiles and GUI scripts
  • Loading branch information
entiri authored May 19, 2021
2 parents 3b27257 + f8e4a90 commit 17b25c3
Show file tree
Hide file tree
Showing 19 changed files with 1,187 additions and 409 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ARG MIRACL_VERSION=latest
FROM mgoubran/miracl:base-$MIRACL_VERSION
#FROM mgoubran/miracl:base-$MIRACL_VERSION
FROM mgoubran/miracl-modified:latest

ADD . /code
RUN ls /code
RUN git clone https://github.com/sergivalverde/nifti_tools && \
mv nifti_tools /code/depends/NIFTI_TOOLS && \
pip install -e /code/
Expand All @@ -12,7 +14,9 @@ ENV MIRACL_HOME=/code/miracl

WORKDIR /tmp
RUN mkdir -p "/code/atlases/" && \
wget -nH -r --cut-dirs 3 --no-parent -A txt,json,csv,nii.gz -P /code/atlases http://web.stanford.edu/group/zeinehlab/MIRACLextra/
wget -nH -r --cut-dirs 3 --no-parent -A txt,json,csv,nii.gz -P /code/atlases http://web.stanford.edu/group/zeinehlab/MIRACLextra/

# RUN conda install -y --no-update-deps pyqt=5

ENV aradir "/code/atlases/ara"

Expand Down Expand Up @@ -46,4 +50,4 @@ ENV IN_DOCKER_CONTAINER Yes

################################################################################

ENTRYPOINT ["/opt/miniconda/bin/miracl"]
ENTRYPOINT ["/bin/bash"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 SRI-RSST

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 22 additions & 13 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y git wget build-essential g++ gcc cmake curl clang && \
apt-get install -y libfreetype6-dev apt-utils pkg-config vim gfortran && \
apt-get install -y binutils make linux-source unzip && \
apt install libxcb-xinerama0 && \
apt install -y libsm6 libxext6 libfontconfig1 libxrender1 && \
apt-get install -y itksnap

# Install miniconda
RUN curl -LO https://repo.anaconda.com/miniconda/Miniconda2-4.6.14-Linux-x86_64.sh && \
bash Miniconda2-4.6.14-Linux-x86_64.sh -p /opt/miniconda -b && \
rm Miniconda2-4.6.14-Linux-x86_64.sh
RUN curl -LO https://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh && \
bash Miniconda3-4.6.14-Linux-x86_64.sh -p /opt/miniconda -b && \
rm Miniconda3-4.6.14-Linux-x86_64.sh
ENV PATH=/opt/miniconda/bin:${PATH}

RUN mkdir -p /code/atlases /data
WORKDIR /code

RUN apt install -y libhdf5-serial-dev && \
apt-get install libatlas-base-dev libblas3 liblapack3 liblapack-dev libblas-dev && \
pip install --upgrade pip && \
pip install matplotlib joblib scipy==1.2.1 && \
pip install tifffile && \
pip install menpo==0.8.0 opencv-python==4.2.0.32 && \
python3 -m pip install numpy && \
python3 -m pip install matplotlib joblib && \
python3 -m pip install scipy==1.2.1 && \
python3 -m pip install tifffile && \
conda install -c menpo menpo && \
python3 -m pip install opencv-python==4.2.0.32 && \
apt remove -y cmake && \
pip install cmake
pip3 install cmake

# Install ANTs
### Install ANTs ###
Expand Down Expand Up @@ -78,12 +83,12 @@ RUN wget https://github.com/ijpb/MorphoLibJ/releases/download/v1.4.0/MorphoLibJ_
RUN wget https://downloads.sourceforge.net/project/c3d/c3d/Nightly/c3d-nightly-Linux-x86_64.tar.gz && \
tar -xzvf c3d-nightly-Linux-x86_64.tar.gz && mv c3d-1.1.0-Linux-x86_64 /opt/cd3 && \
rm c3d-nightly-Linux-x86_64.tar.gz
ENV PATH /opt/c3d/bin:${PATH}
ENV PATH /opt/cd3/bin:${PATH}

# Install FSL, cmake
RUN apt-get update && apt-get install -y fsl && \
apt remove cmake && \
pip install cmake --upgrade
pip3 install cmake --upgrade

ENV FSLDIR="/usr/share/fsl/5.0" \
FSLOUTPUTTYPE="NIFTI_GZ" \
Expand All @@ -97,8 +102,12 @@ ENV FSLDIR="/usr/share/fsl/5.0" \
ENV PATH="/usr/lib/fsl/5.0:${PATH}"

WORKDIR /code
RUN pip install scikit-image==0.14.2 && \
pip install cython h5py && \
pip install pandas==0.24.2
ADD requirements.txt /code
RUN pip3 install scikit-image==0.14.2 && \
pip3 install cython h5py && \
pip3 install pandas==0.24.2 && \
pip3 install -r requirements.txt

RUN conda install -y --no-update-deps pyqt=4
#RUN alias python=python3

#RUN conda install -y --no-update-deps pyqt=5
Binary file added docker/requirements.txt
Binary file not shown.
9 changes: 9 additions & 0 deletions experi/install_c3d.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
c3dpath=$( command -v c3d )
if [[ -z "${c3dpath}" ]]; then
echo "Command c3d was not found. Downloading and installing software to ${SCRIPTPATH}/depends/c3d. Path will be added to PATH environment variable."
mkdir -p "${SCRIPTPATH}/depends/c3d/"
wget https://downloads.sourceforge.net/project/c3d/c3d/Nightly/c3d-nightly-Linux-x86_64.tar.gz && \
tar -xzvf c3d-nightly-Linux-x86_64.tar.gz && mv c3d-1.1.0-Linux-x86_64/* "${SCRIPTPATH}/depends/c3d/" && \
rm c3d-nightly-Linux-x86_64.tar.gz
export PATH="${SCRIPTPATH}/depends/c3d/c3d-1.1.0-Linux-x86_64/bin/:$PATH"
fi
Loading

0 comments on commit 17b25c3

Please sign in to comment.