-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile_ANTs
109 lines (101 loc) · 3.73 KB
/
Dockerfile_ANTs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
FROM nvidia/cuda:11.2.2-devel-ubuntu18.04 as base
ARG TAG_ANTS
FROM base as builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
build-essential \
apt-transport-https \
ca-certificates \
gnupg \
software-properties-common \
wget \
ninja-build \
git \
g++ \
zlib1g-dev \
bc && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt install -y --no-install-recommends \
g++-9 gcc-9 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
| apt-key add - \
&& apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main' \
&& apt-get update \
&& apt-get -y install cmake=3.23.2-0kitware1ubuntu18.04.1 cmake-data=3.23.2-0kitware1ubuntu18.04.1
ARG ANTS_SHA=caa60eb4ad53d561f9ddd72b71a6baf2acac0078
RUN mkdir /tmp/ants \
&& cd /tmp \
&& git clone https://github.com/ANTsX/ANTs.git \
&& mv ANTs /tmp/ants/source \
&& cd /tmp/ants/source \
&& git checkout ${ANTS_SHA} \
&& mkdir -p /tmp/ants/build \
&& cd /tmp/ants/build \
&& mkdir -p /opt/ants \
&& git config --global url."https://".insteadOf git:// \
&& cmake \
-GNinja \
-DBUILD_TESTING=OFF \
-DCMAKE_C_COMPILER=/usr/bin/gcc-9 \
-DCMAKE_CXX_COMPILER=/usr/bin/g++-9 \
-DBUILD_SHARED_LIBS=ON \
-DSuperBuild_ANTS_C_OPTIMIZATION_FLAGS="-mtune=x86-64 -march=x86-64" \
-DSuperBuild_ANTS_CXX_OPTIMIZATION_FLAGS="-mtune=x86-64 -march=x86-64" \
-DCMAKE_INSTALL_PREFIX=/opt/ants \
/tmp/ants/source \
&& cmake --build . --parallel 1 \
&& cd ANTS-build \
&& cmake --install . \
&& cd /opt/ants/bin \
&& rm \
ANTSUseLandmarkImagesToGetAffineTransform \
ANTSUseLandmarkImagesToGetBSplineDisplacementField \
ClusterImageStatistics \
ConvertInputImagePixelTypeToFloat \
ConvertScalarImageToRGB \
ConvertToJpg \
CreateDTICohort \
DeNrrd \
ExtractSliceFromImage \
FitBSplineToPoints \
KellyKapowski \
KellySlater \
NonLocalSuperResolution \
SuperResolution \
SurfaceBasedSmoothing \
TimeSCCAN \
WarpImageMultiTransform \
WarpTensorImageMultiTransform \
WarpTimeSeriesImageMultiTransform \
antsASLProcessing.sh \
antsBOLDNetworkAnalysis.R \
antsCorticalThickness.sh \
antsIntermodalityIntrasubject.sh \
antsLandmarkBasedTransformInitializer \
antsLongitudinalCorticalThickness.sh \
antsMotionCorr \
antsMotionCorrDiffusionDirection \
antsMotionCorrStats \
antsNetworkAnalysis.R \
antsNeuroimagingBattery \
antsSliceRegularizedRegistration \
antsUtilitiesTesting \
sccan \
simpleSynRegistration
FROM base
COPY --from=builder /opt/ants /opt/ants
COPY --from=builder /tmp/ants /tmp/ants
LABEL maintainer="ANTsX team: Forked by QSIPrep team" \
description="ANTs is part of the ANTsX ecosystem (https://github.com/ANTsX). \
ANTs Citation: https://pubmed.ncbi.nlm.nih.gov/24879923"
ENV ANTSPATH="/opt/ants/bin" \
PATH="/opt/ants/bin:$PATH" \
LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH"
RUN apt-get update \
&& apt install -y --no-install-recommends zlib1g-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /var/tmp/*
WORKDIR /data
CMD ["/bin/bash"]