-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
57 lines (47 loc) · 1.62 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
FROM ubuntu:xenial
# Set the working directory to /app
WORKDIR /app
# Install build system and Boost library
RUN apt-get update \
&& apt-get install --yes wget build-essential gcc-multilib libboost-all-dev
# Install GSL
RUN wget -O gsl.tgz ftp://ftp.gnu.org/gnu/gsl/gsl-1.16.tar.gz \
&& tar -zxf gsl.tgz \
&& mkdir gsl \
&& cd gsl-1.16 \
&& ./configure --prefix=/app/gsl \
&& make \
&& make install
ENV LIBRARY_PATH /app/gsl/lib/
ENV CPLUS_INCLUDE_PATH /app/gsl/include/
# Install SimKernel
RUN apt-get install --yes unzip \
&& wget -O simkernel.zip http://github.com/ChristophKirst/SimKernel/archive/master.zip \
&& unzip simkernel.zip \
&& cd SimKernel-master \
&& make \
&& make install
ENV LIBRARY_PATH /app/gsl/lib/:/app/SimKernel-master/lib/
# Install yaml-cpp
RUN apt-get install --yes cmake \
&& wget -O yaml-cpp.zip https://github.com/jbeder/yaml-cpp/archive/release-0.5.3.zip \
&& unzip yaml-cpp.zip \
&& cd yaml-cpp-release-0.5.3 \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make
ENV LIBRARY_PATH /app/gsl/lib/:/app/SimKernel-master/lib/:/app/yaml-cpp-release-0.5.3/build/
ENV LD_LIBRARY_PATH /app/gsl/lib/:/app/SimKernel-master/lib/:/app/yaml-cpp-release-0.5.3/build/
ENV CPLUS_INCLUDE_PATH /app/gsl/include/:/app/gsl/lib/:/app/yaml-cpp-release-0.5.3/include/
# Install Ruby and Rake
RUN apt-get install --yes ruby \
&& gem install rake
# Add the whole repo to the image
COPY . /app
# Update the working directory
WORKDIR /app/transferentropy-sim
# Build te-causality binaries
RUN rake te-extended test
# By default, only execute tests and exit
CMD ./test