-
Notifications
You must be signed in to change notification settings - Fork 50
/
Dockerfile
91 lines (77 loc) · 2.16 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
# Container running SIMA in Python 2.7 with additional optional
# dependencies.
#
# https://github.com/losonczylab/sima
#
# To build:
# docker build -t sima .
#
# To run the image with X forwarding enabled:
# docker run -it --rm --net=host --env="DISPLAY" -v $HOME/.Xauthority:/root/.Xauthority:rw
# -v /PATH/TO/DATA:/data sima
#
FROM debian:jessie
LABEL maintainer="Jeff Zaremba <[email protected]>"
ENV DEBIAN_FRONTEND "noninteractive"
RUN apt-get update -qq && apt-get install -qq \
build-essential \
cmake \
curl \
libatlas-base-dev \
libatlas-dev \
libfreetype6-dev \
libgeos-dev \
libhdf5-dev \
liblapack-dev \
libpng-dev \
python \
python-tk \
python2.7-dev \
unzip \
&& apt-get clean
# Install pip
RUN curl --silent --retry 5 https://bootstrap.pypa.io/get-pip.py | python2.7
# Required for building C libraries, must be installed first
RUN pip install Cython
RUN pip install numpy
# Install required SIMA dependencies
RUN pip install \
future \
pillow \
scikit-image \
scikit-learn \
scipy \
shapely
# Install optional SIMA packages
RUN pip install \
bottleneck \
h5py \
matplotlib \
MDP \
picos
# On first-run matplotlib needs to build a font list
RUN python -c "import matplotlib.pyplot"
# Build and install OpenCV
RUN mkdir /opencv && \
cd /opencv && \
curl -s http://kent.dl.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.13/opencv-2.4.13.zip -o opencv-2.4.13.zip && \
unzip -qq opencv-2.4.13.zip && \
rm opencv-2.4.13.zip && \
mkdir opencv-2.4.13/build && \
cd opencv-2.4.13 && \
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_DIR=/opencv/opencv-2.4.13/build . && \
make && \
make install && \
make clean
# Copy in and install sima
RUN mkdir /sima
COPY . /sima
WORKDIR /sima
RUN python setup.py install
# Download example data for workflow.py
RUN curl -s http://www.losonczylab.org/workflow_data.zip -o /sima/examples/workflow_data.zip && \
cd /sima/examples && \
unzip -qq /sima/examples/workflow_data.zip && \
rm /sima/examples/workflow_data.zip
WORKDIR /sima
CMD python