forked from aertslab/pycisTopic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
78 lines (67 loc) · 2.39 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
FROM python:3.8-slim AS compile-image
ENV DEBIAN_FRONTEND=noninteractive
RUN BUILDPKGS="build-essential \
libcurl4-openssl-dev \
zlib1g-dev \
libfftw3-dev \
libc++-dev \
git \
wget \
" && \
apt-get update && \
apt-get install -y --no-install-recommends apt-utils debconf locales locales-all && dpkg-reconfigure locales && \
apt-get install -y --no-install-recommends $BUILDPKGS
RUN python -m venv /opt/venv
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
# install dependencies:
COPY pycisTopic/requirements.txt /tmp/
RUN pip install --no-cache-dir --upgrade pip wheel && \
pip install --no-cache-dir Cython numpy && \
pip install --no-cache-dir fitsne && \
pip install --no-cache-dir papermill && \
pip install --no-cache-dir igv_jupyterlab && \
pip install --no-cache-dir bs4 && \
pip install --no-cache-dir MACS2 && \
pip install --no-cache-dir lxml && \
pip install --no-cache-dir tspex && \
pip install --no-cache-dir -r /tmp/requirements.txt
# install ctxcore from local copy:
COPY ctxcore /tmp/ctxcore
RUN cd /tmp/ctxcore && \
pip install . && \
cd .. && rm -rf ctxcore
# install pycisTopic from local copy:
COPY pycisTopic /tmp/pycisTopic
RUN cd /tmp/pycisTopic && \
pip install . && \
cd .. && rm -rf pycisTopic
# install Mallet (https://github.com/mimno/Mallet)
# https://github.com/docker-library/openjdk/blob/0584b2804ed12dca7c5e264b5fc55fc07a3ac148/8-jre/slim/Dockerfile#L51-L54
RUN mkdir -p /usr/share/man/man1 && \
apt-get install -y --no-install-recommends ant openjdk-11-jdk && \
git clone --depth=1 https://github.com/mimno/Mallet.git /tmp/Mallet && \
cd /tmp/Mallet && \
ant
# install pycistarget
COPY pycistarget /tmp/pycistarget
RUN cd /tmp/pycistarget && \
pip install . && \
cd .. && rm -rf pycistarget
FROM python:3.8-slim AS build-image
RUN mkdir -p /usr/share/man/man1 && \
apt-get -y update && \
apt-get -y --no-install-recommends install \
openjdk-11-jdk \
procps \
bash-completion \
curl \
libfftw3-dev \
less && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/*
COPY --from=compile-image /opt/venv /opt/venv
COPY --from=compile-image /tmp/Mallet /opt/mallet
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
ENV PATH="/opt/mallet/bin:$PATH"