-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.jobs
62 lines (55 loc) · 2.15 KB
/
Dockerfile.jobs
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
FROM python:2.7
# Install package dependencies for jobs
RUN apt-get -qq update && \
apt-get -qq install --no-install-recommends \
pkg-config \
libpng-dev \
libfreetype6-dev \
libblas-dev \
liblapack-dev \
gfortran \
netcat \
libatlas-base-dev \
libhdf5-dev \
python-tk \
r-base \
r-base-dev \
libffi-dev \
libssl-dev && \
apt-get -qq clean all && \
apt-get -qq autoclean && \
apt-get -qq autoremove && \
rm -rf /var/lib/apt/lists/*
# Configure our app's expected working directory
ENV BASEDIR="/app" \
PYTHONPATH="$BASEDIR"
WORKDIR $BASEDIR/
# Install Python dependencies for jobs (1/2)
# force setuptools v33; newer versions will fail https://github.com/pypa/setuptools/issues/937
# alternative is to update pip, but that requires updating python (otherwise we
# hit security errors), and that's complicated, because ubuntu 14.04 locks in
# 2.7.6
COPY requirements $BASEDIR/requirements/
RUN pip --no-cache-dir install -q setuptools==33.1.1
RUN pip --no-cache-dir install -q numpy==1.11.3
RUN pip --no-cache-dir install -q -r requirements/nest_jobs.txt
# Install Python dependencies for jobs (2/2)
# The following pip packages do not declare their dependencies properly, and
# therefore cannot reliably be installed from the requirements txt files.
# (pip does not install in the order declared in the file, but rather
# an ordering based on installing the order to resolve dependencies)
RUN pip --no-cache-dir install -q biom-format==2.1.5
RUN pip --no-cache-dir install -q h5py==2.5.0 && \
python -c "import skbio" #this prevents a "caching fonts" message on every command
# Copy in demo files, publication data, and pipeline readmes
WORKDIR /
RUN git clone https://github.com/KnowEnG/quickstart-demos && \
cp -r quickstart-demos/demo_files / && \
cp -r quickstart-demos/publication_data /demo_files/ && \
find /demo_files -type f -name \*.bz2 | xargs bzip2 -d && \
cp -r quickstart-demos/pipeline_readmes / && \
rm -rf /quickstart-demos
WORKDIR $BASEDIR/
COPY . .
# Define our jobs worker entrypoint
ENTRYPOINT ["python","-m","nest_py.knoweng.jobs.worker_app"]