-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
66 lines (55 loc) · 1.71 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
FROM gcr.io/google-appengine/python
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
libncursesw5-dev \
libncurses5-dev \
make \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
fuse \
tabix \
graphviz \
libgraphviz-dev \
pkg-config \
libxml2 \
xmlsec1 \
libxml2-dev \
libxmlsec1-dev \
libxmlsec1-openssl \
&& rm -rf /var/lib/apt/lists/*
ENV BCFTOOLS_BIN="bcftools-1.10.tar.bz2" \
BCFTOOLS_PLUGINS="/usr/local/libexec/bcftools" \
BCFTOOLS_VERSION="1.10"
# Install BCFTools
RUN curl -fsSL https://github.com/samtools/bcftools/releases/download/$BCFTOOLS_VERSION/$BCFTOOLS_BIN -o /opt/$BCFTOOLS_BIN \
&& tar xvjf /opt/$BCFTOOLS_BIN -C /opt/ \
&& cd /opt/bcftools-$BCFTOOLS_VERSION \
&& make \
&& make install 2>&1
# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Use python3.7
RUN update-alternatives --install /usr/bin/python python3 /opt/python3.7/bin/python3.7 2 \
&& ln -f /opt/python3.7/bin/python3.7 /env/bin/python \
&& ln -f /opt/python3.7/bin/pip3.7 /env/bin/pip
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt /app/requirements.txt
RUN pip install setuptools==40.3.0
RUN pip install -r /app/requirements.txt
# Add the application source code.
ADD . /app
# tmp to spill error
RUN FLASK_APP=main:app GAE_VERSION=blank-blank flask
# Download the database; GAE_VERSION set as dummy variable
# RUN FLASK_APP=main:app GAE_VERSION=blank-blank flask download_db
CMD gunicorn -b :$PORT main:app