-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile_syd
More file actions
73 lines (64 loc) · 2.79 KB
/
Dockerfile_syd
File metadata and controls
73 lines (64 loc) · 2.79 KB
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
#Docker for syd
#systemctl start docker
#login: docker login
#build: docker build -t tbaudier/syd -f Dockerfile_syd .
#push: docker push tbaudier/syd
#run: docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/tbaudier:/home tbaudier/syd /bin/bash
FROM opensuse:42.3
MAINTAINER Thomas Baudier <thomas.baudier@creatis.insa-lyon.fr>
#Build C++ important files
RUN zypper install --type pattern -y devel_basis \
&& zypper install -y gcc48-c++ \
gcc-c++ \
glib2-devel \
git \
cmake \
glog-devel \
wget \
libXrender1 \
fontconfig \
libGLU1 \
libSM6 \
libXt6 \
#Create folder
&& mkdir -p /Software/ITK/src /Software/ITK/bin /Software/ceres/src /Software/ceres/bin /Software/syd/src /Software/syd/bin /Software/elastix /Software/vv \
#Compile ITK
&& cd /Software/ITK \
&& git clone --branch v4.13.0 https://github.com/InsightSoftwareConsortium/ITK.git src \
&& cd bin \
&& cmake ../src -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF \
&& make -j16 \
&& make install \
#1st run of syd to install hunter with dependencies (eigen, odb, ...)
&& cd /Software/syd \
&& git clone https://github.com/OpenSyd/syd.git src \
&& cd bin \
&& cmake ../src -DCMAKE_CXX_FLAGS=-std=c++11 -DITK_DIR=/Software/ITK/bin -DHUNTER_JOBS_NUMBER=4 \
#Install ceres
&& cd /Software/ceres \
&& git clone https://ceres-solver.googlesource.com/ceres-solver src \
&& cd bin \
&& eigen3Path=`find /root/.hunter/_Base/*/*/*/Install/include -name "eigen3"` \
&& cmake -DBUILD_SHARED_LIBS=ON -DEIGEN_INCLUDE_DIR="$eigen3Path" ../src \
&& make -j16 \
&& make install \
#2nd run of syd to compile it
&& cd /Software/syd/bin \
&& cmake . \
&& make -j16 \
&& echo 'export PATH=/Software/syd/bin/bin:${PATH}' >> /root/.bashrc \
&& echo 'export SYD_PLUGIN=/Software/syd/bin/lib:${SYD_PLUGIN}' >> /root/.bashrc \
#Download elastix
&& cd /Software/elastix \
&& wget http://elastix.isi.uu.nl/download/elastix_linux64_v4.7.tar.bz2 \
&& tar jxvf elastix_linux64_v4.7.tar.bz2 \
&& echo 'export PATH=/Software/elastix/bin:${PATH}' >> /root/.bashrc \
&& echo 'export LD_LIBRARY_PATH=/Software/elastix/lib:${LD_LIBRARY_PATH}' >> /root/.bashrc \
#Download vv
&& cd /Software/vv \
&& wget "https://www.creatis.insa-lyon.fr/owncloud/index.php/s/vLMEsujZ9j4bXci/download" \
&& tar xzvf download \
&& rm download \
&& echo 'export PATH=/Software/vv:${PATH}' >> /root/.bashrc \
&& source /root/.bashrc \
&& ldconfig