forked from NIFTI-Imaging/nifti_clib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (47 loc) · 1.54 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
FROM ubuntu:bionic
# FROM ubuntu:eoan
RUN apt-get update && apt-get install -y -q eatmydata \
&& eatmydata apt-get update && apt-get install -y -q \
cmake \
gcc \
git \
help2man \
libexpat1-dev \
make \
wget \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Install newer cmake version with globally scoped targets for convenience
# (apt installed version is used by default though)
ENV CMAKE_VER=3.13.3
RUN wget -P /opt/cmake https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-Linux-x86_64.tar.gz \
; cd /opt/cmake \
; tar xzvf cmake-${CMAKE_VER}-Linux-x86_64.tar.gz \
;rm -fr cmake-${CMAKE_VER}-Linux-x86_64.tar.gz
RUN mkdir -p /opt/src/nifti_clib
RUN mkdir /nifti_build
COPY . /opt/src/nifti_clib/
WORKDIR /nifti_build
# Test build and install with system-installed cmake
RUN cmake \
-DBUILD_SHARED_LIBS=ON \
-DNIFTI_USE_PACKAGING=ON \
-DUSE_CIFTI_CODE=ON \
-DUSE_FSL_CODE=ON \
-DNIFTI_BUILD_APPLICATIONS=ON \
-DTEST_INSTALL=ON \
-DDOWNLOAD_TEST_DATA=OFF \
/opt/src/nifti_clib \
&& make install \
&& ctest --output-on-failure -LE NEEDS_DATA
# For checking max-verified cmake version successfully builds:
# ENV PATH="/opt/cmake/cmake-${CMAKE_VER}-Linux-x86_64/bin:$PATH"
# RUN cmake \
# -DBUILD_SHARED_LIBS=OFF \
# -DUSE_CIFTI_CODE=ON \
# -DUSE_FSL_CODE=ON \
# -DNIFTI_BUILD_APPLICATIONS=ON \
# -DTEST_INSTALL=ON \
# /opt/src/nifti_clib \
# && make install \
# && ctest --output-on-failure