-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
85 lines (81 loc) · 3.01 KB
/
Dockerfile
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
# Generated by Neurodocker and Reproenv.
FROM debian:buster
ENV ANTSPATH="/opt/ants-2.4.3/" \
PATH="/opt/ants-2.4.3:$PATH"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
ca-certificates \
curl \
unzip \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Downloading ANTs ..." \
&& curl -fsSL -o ants.zip https://github.com/ANTsX/ANTs/releases/download/v2.4.3/ants-2.4.3-centos7-X64-gcc.zip \
&& unzip ants.zip -d /opt \
&& mv /opt/ants-2.4.3/bin/* /opt/ants-2.4.3 \
&& rm ants.zip
# Install R
ARG R_VERSION_MAJOR=4
ARG R_VERSION_MINOR=2
ARG R_VERSION_PATCH=2
ARG CONFIGURE_OPTIONS="--with-cairo --with-jpeglib --enable-R-shlib --with-blas --with-lapack"
RUN apt-get update && apt-get install -y -q --no-install-recommends \
gfortran \
git \
git-annex \
g++ \
libreadline-dev \
libx11-dev \
libxt-dev \
libpng-dev \
libjpeg-dev \
libcairo2-dev \
libssl-dev \
libxml2-dev \
libudunits2-dev \
libgdal-dev \
libbz2-dev \
libzstd-dev \
liblzma-dev \
libpcre2-dev \
locales \
screen \
texinfo \
texlive \
texlive-fonts-extra \
vim \
wget \
xvfb \
tcl8.6-dev \
tk8.6-dev \
cmake \
curl \
unzip \
libcurl4-gnutls-dev \
libgsl-dev \
libcgal-dev \
libglu1-mesa-dev \
libglu1-mesa-dev \
libtiff5-dev
RUN wget https://cran.rstudio.com/src/base/R-${R_VERSION_MAJOR}/R-${R_VERSION_MAJOR}.${R_VERSION_MINOR}.${R_VERSION_PATCH}.tar.gz \
&& tar zxvf R-${R_VERSION_MAJOR}.${R_VERSION_MINOR}.${R_VERSION_PATCH}.tar.gz \
&& rm R-${R_VERSION_MAJOR}.${R_VERSION_MINOR}.${R_VERSION_PATCH}.tar.gz \
&& cd /R-${R_VERSION_MAJOR}.${R_VERSION_MINOR}.${R_VERSION_PATCH} \
&& ./configure ${CONFIGURE_OPTIONS} \
&& make \
&& make install
# Install latest version of cmake for ITKR (ANTsR dependency)
RUN version=3.24 \
&& build=1 \
&& mkdir ~/temp \
&& cd ~/temp \
&& wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz \
&& tar -xzvf cmake-$version.$build.tar.gz \
&& cd cmake-$version.$build/ \
&& ./bootstrap \
&& make -j$(nproc) \
&& make install \
&& alias cmake=$(which cmake)
RUN echo 'options(repos = c(CRAN = "https://cran.rstudio.com/"), download.file.method = "libcurl")' >> /usr/local/lib/R/etc/Rprofile.site \
&& Rscript -e "install.packages(c('Rcpp', 'remotes'))"
RUN git clone https://github.com/stnava/ITKR.git && R CMD INSTALL ITKR && rm -rf ITKR
RUN Rscript -e "remotes::install_github('stnava/ANTsRCore', dependencies=TRUE)"