-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
55 lines (49 loc) · 2.08 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
FROM ctalapp/ctapipe:latest
MAINTAINER CTA LAPP <[email protected]>
ARG CTA_ANALYSIS_CLONE_URL=https://gitlab.in2p3.fr/CTA-LAPP/CTA_Analysis.git
ARG CTA_ANALYSIS_VERSION=master
ARG SWIG_VERSION=3.0.12
ARG GOOGLE_BENCHMARK_VERSION=v1.1.0
ADD eigen3.werror.diff /tmp/
# Install CTA_Analysis dependencies
RUN source activate ${CONDA_ENV} \
&& mkdir -p /root/.config/matplotlib \
&& echo "backend : Agg" > /root/.config/matplotlib/matplotlibrc \
&& conda install -n ${CONDA_ENV} -c menpo eigen \
&& cd /opt/conda/envs/${CONDA_ENV}/include && patch -p0 </tmp/eigen3.werror.diff \
&& cd /tmp \
&& curl -O -J -L https://downloads.sourceforge.net/project/swig/swig/swig-${SWIG_VERSION}/swig-${SWIG_VERSION}.tar.gz \
&& tar zxf swig-${SWIG_VERSION}.tar.gz \
&& cd swig-${SWIG_VERSION} \
&& source activate ${CONDA_ENV} \
&& ./configure \
&& make -j`grep -c '^processor' /proc/cpuinfo` \
&& make install \
&& rm -rf /tmp swig-${SWIG_VERSION}.tar.gz swig-${SWIG_VERSION} \
&& cd /opt \
&& git clone https://github.com/google/benchmark.git /opt/benchmark \
&& cd /opt/benchmark \
&& git checkout ${GOOGLE_BENCHMARK_VERSION} \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. \
&& make all install \
&& rm -rf /opt/benchmark \
&& cd /opt \
&& pip install cython matplotlib==1.5.2
# Clone CTA_Analysis GIT repository
RUN source activate ${CONDA_ENV} \
&& conda install pytest \
&& git clone $CTA_ANALYSIS_CLONE_URL /opt/CTA_Analysis \
&& cd /opt/CTA_Analysis \
&& git checkout $CTA_ANALYSIS_VERSION
# Build and install CTA_Analysis
RUN source activate ${CONDA_ENV} \
&& cd /opt/CTA_Analysis \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DRELEASE_MODE=no -DUSE_PYTHON=yes -DEIGEN_INCLUDE_DIR=/opt/conda/envs/${CONDA_ENV}/include -DPYTHON_INCLUDE_DIR=/opt/conda/envs/${CONDA_ENV}/include/python3.5m -DPYTHON_LIBRARY=/opt/conda/envs/${CONDA_ENV}/lib/libpython3.5m.so \
&& make -j`grep -c '^processor' /proc/cpuinfo` all install \
&& ldconfig
RUN mkdir /tmp ; chmod 777 /tmp ; chmod +t /tmp
ENV PYTHON_EGG_CACHE=/tmp/.cache