-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
31 lines (24 loc) · 1019 Bytes
/
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
FROM python:3.7
LABEL maintainer="pedro.cerqueira@medicina.ulisboa.pt"
WORKDIR /app
ADD . /app
EXPOSE 5000
ENV FLASK_APP ref_ns_security_run.py
ENV FLASK_RUN_HOST 0.0.0.0
ENV FLASK_DEBUG=1
#RUN apk add --no-cache gcc musl-dev linux-headers
RUN pip install --upgrade pip
RUN pip install gunicorn
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# install BLAST+
RUN mkdir /blast
RUN cd ../blast; wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.10.0/ncbi-blast-2.10.0+-x64-linux.tar.gz \
&& tar -xzvf ncbi-blast-2.10.0+-x64-linux.tar.gz && rm ncbi-blast-2.10.0+-x64-linux.tar.gz
ENV PATH="/blast/ncbi-blast-2.10.0+/bin:${PATH}"
#ENTRYPOINT ["python","ref_ns_security_run.py"]
#CMD [ "flask", "run" ]
# Run container with gunicorn
# More info about workers, threads and --worker-tmp-dir
# https://pythonspeed.com/articles/gunicorn-in-docker/
CMD ["gunicorn", "--worker-tmp-dir", "/dev/shm", "-w", "7", "--threads=4", "--worker-class=gthread", "-b", "0.0.0.0:5000", "wsgi:app"]