-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
60 lines (46 loc) · 1.68 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
# set the environment for compilation
FROM ubuntu:20.04
ENV TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y \
build-essential \
tzdata \
cmake \
git \
wget \
pkg-config \
libgomp1
ARG version=1.0.1
# Set the working directory
RUN mkdir -p ./traitrelax/exec \
&& wget https://github.com/halabikeren/TraitRELAX/releases/download/$version/traitrelax_v$version.tar.gz \
&& tar -xf traitrelax_v$version.tar.gz -C ./traitrelax
COPY traitrelax /traitrelax
WORKDIR /traitrelax/
# compile bpp-core
RUN mkdir -p /traitrelax/bpp-core/build/ \
&& cd /traitrelax/bpp-core/build/ \
&& cmake -DCMAKE_INSTALL_PREFIX=/traitrelax/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE .. \
&& make \
&& make install
# compile bpp-seq
RUN mkdir -p /traitrelax/bpp-seq/build/ \
&& cd /traitrelax/bpp-seq/build/ \
&& cmake -DCMAKE_INSTALL_PREFIX=/traitrelax/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE .. \
&& make \
&& make install
# compile bpp-phyl
RUN mkdir -p /traitrelax/bpp-phyl/build/ \
&& cd /traitrelax/bpp-phyl/build/ \
&& cmake -DCMAKE_INSTALL_PREFIX=/traitrelax/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE OMP_NUM_THREADS=4 .. \
&& make \
&& make install
# compile TraitRELAX
RUN cd /traitrelax/TraitRELAX/ \
&& cmake -DCMAKE_INSTALL_PREFIX=/traitrelax/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE . \
&& make \
&& make install
# execute TraitRELAX with argument given when the docker is run
WORKDIR /traitrelax/exec/
ENTRYPOINT ["/traitrelax/TraitRELAX/TraitRELAX/TraitRELAX"]
CMD ["param=./parameters.bpp"]