forked from darcyabjones/pante
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmmseqs.Dockerfile
87 lines (77 loc) · 2.39 KB
/
mmseqs.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
ARG IMAGE
FROM "${IMAGE}" as builder
## Config variables
ARG MMSEQS_TAG="9-d36de"
ARG MMSEQS_CMAKE_OPTIONS=""
ARG MMSEQS_REPO="https://github.com/soedinglab/MMseqs2.git"
ARG MMSEQS_PREFIX_ARG="/opt/mmseqs/${MMSEQS_TAG}"
ENV MMSEQS_PREFIX="${MMSEQS_PREFIX_ARG}"
WORKDIR /tmp
RUN set -eu \
&& DEBIAN_FRONTEND=noninteractive \
&& . /build/base.sh \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
libbz2-dev \
libmpich-dev \
xxd \
zlib1g-dev \
&& rm -rf -- /var/lib/apt/lists/* \
&& update-ca-certificates \
&& git clone "${MMSEQS_REPO}" . \
&& git fetch --tags \
&& git checkout "tags/${MMSEQS_TAG}" \
&& git submodule update --init \
&& mkdir -p build \
&& cd build \
&& cmake \
${MMSEQS_CMAKE_OPTIONS} \
-DHAVE_MPI=1 \
-DHAVE_AVX2=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${MMSEQS_PREFIX}" .. \
&& make \
&& make install \
&& mv "${MMSEQS_PREFIX}/bin/mmseqs" "${MMSEQS_PREFIX}/bin/mmseqs.avx2" \
&& cmake \
${MMSEQS_CMAKE_OPTIONS} \
-DHAVE_MPI=1 \
-DHAVE_AVX2=0 \
-DHAVE_SSE4_1=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${MMSEQS_PREFIX}" .. \
&& make \
&& make install \
&& mv "${MMSEQS_PREFIX}/bin/mmseqs" "${MMSEQS_PREFIX}/bin/mmseqs.sse4" \
&& cp ../util/mmseqs_wrapper.sh "${MMSEQS_PREFIX}/bin/mmseqs" \
&& sed -i 's~/usr/local/bin/mmseqs_avx2~"${MMSEQS_PREFIX}/bin/mmseqs.avx2"~g' "${MMSEQS_PREFIX}/bin/mmseqs" \
&& sed -i 's~/usr/local/bin/mmseqs_sse42~"${MMSEQS_PREFIX}/bin/mmseqs.sse4"~g' "${MMSEQS_PREFIX}/bin/mmseqs" \
&& add_runtime_dep \
gawk \
bash \
grep \
libbz2-1.0 \
libgomp1 \
libstdc++6 \
mpich \
zlib1g
FROM "${IMAGE}"
LABEL maintainer="[email protected]"
ARG MMSEQS_TAG
ARG MMSEQS_PREFIX_ARG
ENV MMSEQS_PREFIX="${MMSEQS_PREFIX_ARG}"
LABEL mmseqs.version="${MMSEQS_TAG}"
ENV PATH="${MMSEQS_PREFIX}/bin:${PATH}"
COPY --from=builder "${MMSEQS_PREFIX}" "${MMSEQS_PREFIX}"
COPY --from=builder "${APT_REQUIREMENTS_FILE}" /build/apt/mmseqs.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}"