-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathseqrenamer.Dockerfile
80 lines (61 loc) · 2.4 KB
/
seqrenamer.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
ARG IMAGE
ARG GFFPAL_IMAGE
FROM "${GFFPAL_IMAGE}" as gffpal_builder
FROM "${IMAGE}" as seqrenamer_builder
ARG SEQRENAMER_TAG
ARG SEQRENAMER_REPO="https://github.com/darcyabjones/seqrenamer.git"
ARG SEQRENAMER_PREFIX_ARG="/opt/seqrenamer/${SEQRENAMER_TAG}"
ENV SEQRENAMER_PREFIX="${SEQRENAMER_PREFIX_ARG}"
ARG GFFPAL_TAG
ARG GFFPAL_PREFIX_ARG="/opt/gffpal/${GFFPAL_TAG}"
ENV GFFPAL_PREFIX="${GFFPAL_PREFIX_ARG}"
LABEL gffpal.version="${GFFPAL_TAG}"
ENV PATH "${GFFPAL_PREFIX}/bin:${PATH}"
ENV PYTHONPATH "${GFFPAL_PREFIX}/lib/python3.7/site-packages:${PYTHONPATH}"
COPY --from=gffpal_builder "${GFFPAL_PREFIX}" "${GFFPAL_PREFIX}"
COPY --from=gffpal_builder "${APT_REQUIREMENTS_FILE}" /build/apt/gffpal.txt
WORKDIR /tmp
RUN set -eu \
&& DEBIAN_FRONTEND=noninteractive \
&& . /build/base.sh \
&& apt-get update \
&& apt_install_from_file /build/apt/*.txt \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
git \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates \
&& git clone "${SEQRENAMER_REPO}" . \
&& git fetch --tags \
&& git checkout "tags/${SEQRENAMER_TAG}" \
&& pip3 install --prefix="${SEQRENAMER_PREFIX}" . \
&& add_runtime_dep python3
FROM "${IMAGE}"
ARG SEQRENAMER_TAG
ARG SEQRENAMER_PREFIX_ARG="/opt/seqrenamer/${SEQRENAMER_TAG}"
ENV SEQRENAMER_PREFIX="${SEQRENAMER_PREFIX_ARG}"
LABEL seqrenamer.version="${SEQRENAMER_TAG}"
ENV PATH "${SEQRENAMER_PREFIX}/bin:${PATH}"
ENV PYTHONPATH "${SEQRENAMER_PREFIX}/lib/python3.7/site-packages:${PYTHONPATH}"
COPY --from=seqrenamer_builder "${SEQRENAMER_PREFIX}" "${SEQRENAMER_PREFIX}"
COPY --from=seqrenamer_builder "${APT_REQUIREMENTS_FILE}" /build/apt/seqrenamer.txt
ARG GFFPAL_TAG
ARG GFFPAL_PREFIX_ARG="/opt/gffpal/${GFFPAL_TAG}"
ENV GFFPAL_PREFIX="${GFFPAL_PREFIX_ARG}"
LABEL gffpal.version="${GFFPAL_TAG}"
ENV PATH "${GFFPAL_PREFIX}/bin:${PATH}"
ENV PYTHONPATH "${GFFPAL_PREFIX}/lib/python3.7/site-packages:${PYTHONPATH}"
COPY --from=gffpal_builder "${GFFPAL_PREFIX}" "${GFFPAL_PREFIX}"
COPY --from=gffpal_builder "${APT_REQUIREMENTS_FILE}" /build/apt/gffpal.txt
RUN set -eu \
&& DEBIAN_FRONTEND=noninteractive \
&& . /build/base.sh \
&& apt-get update \
&& apt_install_from_file /build/apt/*.txt \
&& rm -rf /var/lib/apt/lists/* \
&& cat /build/apt/*.txt >> "${APT_REQUIREMENTS_FILE}"