forked from intact-project/LungNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (55 loc) · 2.48 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
# This is a part of the supplementary material uploaded along with
# the manuscript:
# "Semantic Segmentation of Pathological Lung Tissue with Dilated Fully Convolutional Networks"
# M. Anthimopoulos, S. Christodoulidis, L. Ebner, A. Christe and S. Mougiakakou
# IEEE Journal of Biomedical and Health infomatics (2018)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# For more information please read the README file. The files can also
# be found at: https://github.com/intact-project/LungNet
FROM nvidia/cuda:8.0-cudnn5-devel
# Installing system tools
RUN apt-get update && apt-get install -y --no-install-recommends \
python python-dev python-tk python-pip python-pydot graphviz \
git g++ gcc gfortran cmake \
libatlas-base-dev
# Installing general purpose python packages
RUN apt-get install -y --no-install-recommends python-numpy
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install --upgrade cython
RUN pip install --upgrade glob2
RUN pip install --upgrade ipdb
RUN pip install --upgrade matplotlib
RUN pip install --upgrade pillow
RUN pip install --upgrade h5py
# Installing libgpuarray
RUN git clone https://github.com/Theano/libgpuarray.git && \
cd libgpuarray && mkdir Build && cd Build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make && \
make install && \
cd .. && \
python setup.py build && \
python setup.py install
RUN rm -rf libgpuarray
RUN ldconfig
# Setting up project dependencies
RUN pip install --upgrade keras==2.1.5
RUN pip install --upgrade Theano==1.0.1
WORKDIR "/home"
RUN mkdir /root/.keras
RUN echo "{\"backend\": \"theano\", \"image_data_format\": \"channels_last\", \"image_dim_ordering\": \"th\", \"floatx\": \"float32\"}" > /root/.keras/keras.json
RUN echo "[global]\ndevice=cuda\nfloatX=float32\noptimizer_including=cudnn\nmode=FAST_RUN\nallow_gc=true\n[nvcc]\nfastmath=True" > /root/.theanorc