forked from psnehal/encore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prod
78 lines (64 loc) · 2.07 KB
/
Dockerfile.prod
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
FROM python:3.7-buster
ARG SAIGE_VERSION=0.35.8.3
ARG HTSLIB_VERSION=1.9
ARG EPACTS_VERSION=3.4.2
# install general dependencies
RUN apt-get update && apt-get install -y \
apache2 \
autoconf \
autotools-dev \
build-essential \
cmake \
curl \
default-mysql-client \
default-libmysqlclient-dev \
ghostscript \
git \
gnuplot \
groff \
libapache2-mod-wsgi-py3 \
libssl-dev \
r-recommended \
slurm-client \
zlibc \
&& rm -rf /var/lib/apt/lists/*
# install saige
RUN wget https://github.com/weizhouUMICH/SAIGE/releases/download/v${SAIGE_VERSION}/SAIGE_${SAIGE_VERSION}_R_x86_64-pc-linux-gnu.tar.gz \
-O /tmp/saige.tar.gz \
&& R CMD INSTALL /tmp/saige.tar.gz \
&& rm /tmp/saige.tar.gz
# install tabix
RUN wget https://github.com/samtools/htslib/releases/download/${HTSLIB_VERSION}/htslib-${HTSLIB_VERSION}.tar.bz2 \
-O /tmp/htslib.tar.bz2 \
&& tar -jxvf /tmp/htslib.tar.bz2 -C /tmp/ \
&& cd /tmp/htslib-${HTSLIB_VERSION} \
&& autoheader \
&& autoconf \
&& ./configure \
&& make \
&& make install \
&& rm -rf /tmp/htslib.tar.bz2 /tmp/htslib-${HTSLIB_VERSION}
# install EPACTS
RUN wget https://github.com/statgen/EPACTS/archive/v${EPACTS_VERSION}.tar.gz \
-O /tmp/epacts.tar.gz \
&& tar -xvf /tmp/epacts.tar.gz -C /tmp/ \
&& cd /tmp/EPACTS-${EPACTS_VERSION} \
&& pip install cget \
&& cget install -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC" -f requirements.txt \
&& mkdir -p /tmp/EPACTS-${EPACTS_VERSION}/build \
&& cd /tmp/EPACTS-${EPACTS_VERSION}/build/ \
&& cmake -DCMAKE_TOOLCHAIN_FILE=../cget/cget/cget.cmake -DCMAKE_BUILD_TYPE=Release .. \
&& make \
&& make install \
&& rm -rf /tmp/epacts.tar.gz /tmp/EPACTS-${EPACTS_VERSION}
COPY . /srv/encore
RUN mkdir /srv/encore/build
WORKDIR /srv/encore/build
RUN cmake -DCMAKE_BUILD_TYPE=Release .. \
&& make
WORKDIR /srv/encore
RUN pip install -r requirements.txt \
&& ln -s /srv/encore/encore.conf.example /etc/apache2/sites-enabled/encore.conf
EXPOSE 80/tcp
EXPOSE 443/tcp
CMD [ "/bin/bash", "-c", "rm -f /var/run/apache2/* && apache2ctl -D FOREGROUND" ]