-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh: Minimum supported Ubuntu version 16.04, use 18.04 for Docker image
- Require C++14 compiler. - Require CMake 3.4 or later. - Use Ubuntu 18.04 as base Docker image. - Use VTK 8 in Docker image.
- Loading branch information
1 parent
d007d0c
commit 4714f88
Showing
7 changed files
with
61 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# ============================================================================ | ||
# Medical Image Registration ToolKit (MIRTK) | ||
# | ||
# Copyright 2013-2017 Imperial College London | ||
# Copyright 2013-2018 Andreas Schuh | ||
# Copyright 2013-2019 Imperial College London | ||
# Copyright 2013-2019 Andreas Schuh | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -56,11 +56,11 @@ basis_project ( | |
SOVERSION "0" # API yet unstable | ||
AUTHORS "Andreas Schuh" | ||
DESCRIPTION "Medical Image Registration ToolKit" | ||
COPYRIGHT "2013-2018 Imperial College London, Andreas Schuh" | ||
COPYRIGHT "2013-2019 Imperial College London, Andreas Schuh" | ||
LICENSE "Apache License Version 2.0" | ||
CONTACT "Andreas Schuh <[email protected]>" | ||
TEMPLATE "with-basis-submodule/1.0" | ||
LANGUAGES C CXX-11 | ||
LANGUAGES C CXX-14 | ||
|
||
# -------------------------------------------------------------------------- | ||
# directories | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,42 +13,38 @@ | |
## | ||
## https://hub.docker.com/r/biomedia/ubuntu/ | ||
|
||
FROM ubuntu:14.04 | ||
FROM ubuntu:18.04 | ||
|
||
MAINTAINER Andreas Schuh <[email protected]> | ||
LABEL Maintainer="Andreas Schuh <[email protected]>" | ||
LABEL Description="Ubuntu with prerequisits for MIRTK installed" Vendor="BioMedIA" | ||
|
||
# No. of threads to use for build (--build-arg THREADS=8) | ||
# By default, all available CPUs are used. When a Docker Machine is used, | ||
# set the number of CPUs in the VirtualBox VM Settings. | ||
ARG THREADS | ||
|
||
# When VTK_VERSION='', the official libvtk6-dev package is used. | ||
# When VTK_VERSION='', the official libvtk7-dev package is used. | ||
# Note, however, that this results in a Docker image that is about twice | ||
# the size of the image when a custom VTK build without Qt, wrappers, | ||
# and unused VTK modules is used instead! | ||
ARG VTK_VERSION=7.0.0 | ||
ARG VTK_VERSION=8.2.0 | ||
|
||
ARG EIGEN_VERSION=3.2.8 | ||
ARG EIGEN_VERSION=3.3.7 | ||
|
||
ARG CXX_STANDARD=c++14 | ||
|
||
# Install prerequisites for MIRTK build | ||
# | ||
# The bzindovic/suitesparse-bugfix-1319687 PPA is required for building | ||
# shared libraries which link with the static SuiteSparse libraries due | ||
# to a bug in the official Ubuntu package: | ||
# https://bugs.launchpad.net/ubuntu/+source/suitesparse/+bug/1333214 | ||
RUN NUM_CPUS=${THREADS:-`cat /proc/cpuinfo | grep processor | wc -l`} \ | ||
&& echo "Maximum number of build threads = $NUM_CPUS" \ | ||
&& apt-get update && apt-get install -y --no-install-recommends \ | ||
software-properties-common \ | ||
&& add-apt-repository -y ppa:bzindovic/suitesparse-bugfix-1319687 \ | ||
&& apt-get update && apt-get install -y --no-install-recommends \ | ||
wget \ | ||
gcc \ | ||
g++ \ | ||
make \ | ||
cmake \ | ||
python \ | ||
python3 \ | ||
freeglut3-dev \ | ||
libarpack2-dev \ | ||
libboost-math-dev \ | ||
|
@@ -77,13 +73,13 @@ RUN NUM_CPUS=${THREADS:-`cat /proc/cpuinfo | grep processor | wc -l`} \ | |
&& wget -O archive.tar.bz2 http://bitbucket.org/eigen/eigen/get/${EIGEN_VERSION}.tar.bz2 \ | ||
&& tar vxjf archive.tar.bz2 --strip 1 \ | ||
&& mv signature_of_eigen3_matrix_library Eigen /usr/include/eigen3/ \ | ||
&& mv cmake/FindEigen3.cmake /usr/share/cmake-2.8/Modules/ \ | ||
&& mv cmake/FindEigen3.cmake /usr/share/cmake-3.10/Modules/ \ | ||
&& cd /usr/src \ | ||
&& rm -rf ${EIGEN_SOURCE_DIR}; \ | ||
fi \ | ||
&& \ | ||
if [ -z ${VTK_VERSION} ]; then \ | ||
apt-get install -y libvtk6-dev; \ | ||
apt-get install -y libvtk7-dev; \ | ||
else \ | ||
VTK_RELEASE=`echo ${VTK_VERSION} | sed s/\.[0-9]*$//` \ | ||
&& cd /usr/src \ | ||
|
@@ -95,7 +91,7 @@ RUN NUM_CPUS=${THREADS:-`cat /proc/cpuinfo | grep processor | wc -l`} \ | |
&& cmake \ | ||
-D CMAKE_INSTALL_PREFIX=/usr/local \ | ||
-D CMAKE_BUILD_TYPE=Release \ | ||
-D CMAKE_CXX_FLAGS=-std=c++11 \ | ||
-D CMAKE_CXX_STANDARD=${CXX_STANDARD} \ | ||
-D VTK_USE_SYSTEM_PNG=ON \ | ||
-D VTK_USE_SYSTEM_ZLIB=ON \ | ||
-D BUILD_SHARED_LIBS=ON \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,9 @@ | |
## https://hub.docker.com/r/biomedia/mirtk/ | ||
|
||
# Pre-made Ubuntu system with all MIRTK dependencies installed | ||
FROM biomedia/ubuntu:mirtk | ||
FROM biomedia/ubuntu:18.04-mirtk | ||
|
||
MAINTAINER Andreas Schuh <[email protected]> | ||
LABEL Maintainer="Andreas Schuh <[email protected]>" | ||
LABEL Description="Medical Image Registration ToolKit (MIRTK)" Vendor="BioMedIA" | ||
|
||
# Git repository and commit SHA from which this Docker image was built | ||
|
@@ -39,12 +39,12 @@ ARG THREADS | |
ARG BUILD_TESTING=OFF | ||
|
||
# Build and install MIRTK | ||
COPY . /usr/src/MIRTK | ||
RUN ls /usr/src/MIRTK \ | ||
COPY . /usr/src/mirtk | ||
RUN ls /usr/src/mirtk \ | ||
&& NUM_CPUS=${THREADS:-`cat /proc/cpuinfo | grep processor | wc -l`} \ | ||
&& echo "Maximum number of build threads = $NUM_CPUS" \ | ||
&& mkdir /usr/src/MIRTK/Build \ | ||
&& cd /usr/src/MIRTK/Build \ | ||
&& mkdir /usr/src/mirtk/Build \ | ||
&& cd /usr/src/mirtk/Build \ | ||
&& cmake \ | ||
-D CMAKE_INSTALL_PREFIX=/usr/local \ | ||
-D CMAKE_BUILD_TYPE=Release \ | ||
|
@@ -64,6 +64,7 @@ RUN ls /usr/src/MIRTK \ | |
-D MODULE_DrawEM=ON \ | ||
-D MODULE_Mapping=ON \ | ||
-D MODULE_Scripting=ON \ | ||
-D MODULE_Viewer=ON \ | ||
-D WITH_ARPACK=ON \ | ||
-D WITH_FLANN=ON \ | ||
-D WITH_MATLAB=OFF \ | ||
|
@@ -78,10 +79,10 @@ RUN ls /usr/src/MIRTK \ | |
&& if [ ${BUILD_TESTING} = ON ]; then make -j $NUM_CPUS && make test; fi \ | ||
&& make -j $NUM_CPUS install \ | ||
&& cd /usr/src \ | ||
&& rm -rf /usr/src/MIRTK | ||
&& rm -rf /usr/src/mirtk | ||
|
||
# Make "mirtk" the default executable for application containers | ||
ENTRYPOINT ["python", "/usr/local/bin/mirtk"] | ||
ENTRYPOINT ["python3", "/usr/local/bin/mirtk"] | ||
CMD ["help"] | ||
|
||
# Assume user data volume to be mounted at /data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters