This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
137 lines (125 loc) · 3.38 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
FROM debian
### Acquires required packages and libraries ###
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
build-essential \
cmake \
git \
wget \
unzip \
openslide-tools \
libpcre++-dev \
qt5-default \
autoconf \
automake \
libtool \
pkg-config \
glib2.0 \
libboost-all-dev \
libjpeg-dev \
libtiff-dev \
libcairo2-dev \
libgdk-pixbuf2.0-dev \
libxml2-dev \
zlib1g-dev \
swig3.0
### Compiles the required libraries ###
RUN mkdir libraries
WORKDIR /libraries/
RUN git clone https://github.com/Kitware/CMake.git && \
ls -lh && \
cd CMake && \
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/ . && \
make -j 4 && \
make install && \
cd .. && \
rm CMake -r
RUN wget http://www.ece.uvic.ca/%7Efrodo/jasper/software/jasper-2.0.14.tar.gz && \
tar -xzf jasper-2.0.14.tar.gz && \
rm jasper-2.0.14.tar.gz && \
cd jasper-2.0.14/build && \
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/ .. && \
make -j 4 && \
make install && \
cd ../.. && \
rm jasper-2.0.14 -r
RUN wget https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz && \
tar -xzf v2.3.0.tar.gz && \
mkdir openjpeg-2.3.0/build/ && \
rm v2.3.0.tar.gz && \
cd openjpeg-2.3.0/build && \
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/ .. && \
make -j 4 && \
make install && \
cd ../.. && \
rm openjpeg-2.3.0 -r
RUN wget https://www.sqlite.org/2019/sqlite-autoconf-3270100.tar.gz && \
tar -xzf sqlite-autoconf-3270100.tar.gz && \
rm sqlite-autoconf-3270100.tar.gz && \
cd sqlite-autoconf-3270100 && \
./configure --libdir /usr/lib/ --includedir /usr/include/ && \
make -j 4 && \
make install && \
cd .. && \
rm sqlite-autoconf-3270100 -r
RUN git clone https://github.com/zeux/pugixml.git && \
cd pugixml && \
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/ . && \
make -j 4 && \
make install && \
cp src/* /usr/include/ && \
cd .. && \
rm pugixml -r
RUN git clone https://github.com/openslide/openslide.git && \
cd openslide && \
autoreconf -i && \
./configure --libdir /usr/lib/ --includedir /usr/include/ && \
make -j 4 && \
make install && \
cd .. && \
rm openslide -r
RUN git clone https://github.com/opencv/opencv.git && \
cd opencv && \
mkdir build && \
cd build && \
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/ .. && \
make -j 4 && \
make install && \
cd ../.. && \
rm opencv -r
RUN git clone --single-branch --branch master https://github.com/computationalpathologygroup/ASAP.git && \
cd ASAP && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/ \
-DOPENSLIDE_INCLUDE_DIR=/usr/include/openslide/ \
-DBOOST_ROOT=/usr/ \
-DBUILD_DIAG_PATHOLOGY_EXECUTABLES=OFF \
-DBUILD_DIAG_PATHOLOGY_TESTS=OFF \
-DBUILD_BUILD_EXECUTABLES=OFF \
-DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_VSI_SUPPORT=OFF \
-DBUILD_TESTS=OFF \
. && \
make -j 4 && \
make install && \
cd .. && \
rm ASAP -r
### Compiles the stain normalization algorithm ###
ADD . ./WSICS/
RUN cd WSICS && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBOOST_ROOT=/usr/ \
-DASAP_INCLUDE_DIRS=/usr/include/ \
-DASAP_LIB_DIRS=/usr/lib/ \
. && \
make -j 4 && \
make install && \
cd .. && \
rm WSICS -r
### Sets the entrypoint ###
RUN rm /libraries/ -r
WORKDIR /usr/bin/
ENTRYPOINT [ "wsics" ]
CMD []