This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
100 lines (70 loc) · 3 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# .....................................................................................
# Conda base
# Base image for installing packages with Conda
FROM conda/miniconda3:latest as conda_base
RUN conda update -n base -c conda-forge conda
# Install conda-pack for shrinking images
# RUN conda install -c conda-forge conda-pack
# .....................................................................................
# Web server
# .....................................................................................
FROM ubuntu:latest as complexify_api
RUN apt-get update && apt-get install -y python3 python3-pip sqlite3
# Copy web requirements
COPY ./web-requirements.txt /app/requirements.txt
COPY ./complexify/common /app/complexify/common
COPY ./complexify/web /app/complexify/web
COPY ./complexify/task_definitions /app/task_definitions
EXPOSE 5000
WORKDIR /app
ENV PYTHONPATH "${PYTHONPATH}:/app"
RUN pip install -r /app/requirements.txt
ENTRYPOINT [ "python3" ]
CMD [ "/app/complexify/web/app.py" ]
# .....................................................................................
# Job Flow container - Wrapped makeflows
FROM conda_base as job_flow
RUN conda update -n base -c conda-forge conda && \
conda install -y -c conda-forge ndcctools zip unzip
COPY ./job_flow-requirements.txt /app/requirements.txt
COPY ./complexify/common /app/complexify/common
COPY ./complexify/job_flow /app/complexify/job_flow
WORKDIR /app
ENV PYTHONPATH "${PYTHONPATH}:/app"
RUN pip install -r /app/requirements.txt
SHELL ["/bin/bash", "-c"]
ENTRYPOINT ["python", "/app/complexify/job_flow/daemon.py"]
# .....................................................................................
# Catalog Server
# Catalog server image, starts and maintains an instance of cctools catalog server
FROM conda_base as cat_server
RUN conda update -n base -c conda-forge conda && \
conda install -y -c conda-forge ndcctools
SHELL ["/bin/bash", "-c"]
ENTRYPOINT ["catalog_server", "-p", "9097"]
# .....................................................................................
# Worker
# Container that does computational work. Use cctools work queue factory as daemon
FROM conda_base as worker
RUN conda update -n base -c conda-forge conda && \
conda install -y -c conda-forge ndcctools tiledb=2.2.9 gdal libspatialindex rtree git zip openjdk=8 font-ttf-dejavu-sans-mono
ENV PROJ_LIB=/usr/local/share/proj/
RUN pip install specify-lmpy
# Install BiotaPhyPy
RUN mkdir git && \
cd git && \
git clone https://github.com/biotaphy/BiotaPhyPy.git && \
cd BiotaPhyPy && \
pip install .
# Install lmtools
RUN cd git && \
git clone https://github.com/specifysystems/lmtools.git && \
cd lmtools && \
pip install .
# Maxent
RUN cd git && \
git clone https://github.com/mrmaxent/Maxent.git
ENV MAXENT_VERSION=3.4.4
ENV MAXENT_JAR=/git/Maxent/ArchivedReleases/$MAXENT_VERSION/maxent.jar
SHELL ["/bin/bash", "-c"]
ENTRYPOINT ["work_queue_factory", "-T", "local", "--debug=all", "-N", "lm.\\*", "--catalog=catalog_server:9097"]