-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
80 lines (66 loc) · 2.06 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
FROM python:2.7.16-slim-buster as builder
ENV PYTHON_VERSION 2.17.16
ENV DCC_VERSION 0.4.7
ENV HTSLIB_VERSION 1.9
WORKDIR /tmp
RUN apt-get update -y \
&& apt-get install --no-install-recommends -y \
libnss-sss \
time \
tzdata \
wget \
bzip2 \
make \
g++ \
libz-dev \
libbz2-dev \
liblzma-dev \
libcurl4-openssl-dev \
libssl-dev \
zlib1g-dev \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/*
# Build htslib for pysam; download DCC so wget isn't required later
RUN wget -q https://github.com/samtools/htslib/releases/download/${HTSLIB_VERSION}/htslib-${HTSLIB_VERSION}.tar.bz2 \
&& wget -q https://github.com/dieterich-lab/DCC/archive/v${DCC_VERSION}.tar.gz \
&& tar xjvf htslib-${HTSLIB_VERSION}.tar.bz2 \
&& cd htslib-${HTSLIB_VERSION} \
&& make \
&& cd .. \
&& rm -rf htslib-${HTSLIB_VERSION}*
# Use wheel so python packages can be installed quickly later
COPY ./requirements.txt /tmp
RUN pip install -U pip \
&& pip wheel -r ./requirements.txt \
&& pip install --no-index --find-links=/tmp/ -r ./requirements.txt
# Multi-stage build
FROM python:2.7.16-slim-buster
LABEL maintainer="John Budde <budde@wustl.edu>"
LABEL org.label-schema.schema-version="1.0"
# LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="buddej/dcc"
LABEL org.label-schema.description="Image for DCC using python 2.7.16"
WORKDIR /tmp
RUN apt-get update -y \
&& apt-get install --no-install-recommends -y \
libnss-sss \
time \
tzdata \
libcurl4-openssl-dev \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/*
ENV DCC_VERSION 0.4.7
COPY --from=builder /tmp /tmp
RUN pip install -U pip \
&& pip install --no-cache-dir -r /tmp/requirements.txt -f /tmp \
&& tar xzvf v${DCC_VERSION}.tar.gz \
&& rm -fv v${DCC_VERSION}.tar.gz \
&& cd DCC-${DCC_VERSION}/ \
&& python setup.py install \
&& cd \
&& rm -rf /tmp/ \
&& rm -rf /root/.cache/pip/*
ENV PYTHON_VERSION 2.17.16
ENV HTSLIB_VERSION 1.9
ENV TZ "America/Chicago"
CMD ["/bin/bash"]