-
Notifications
You must be signed in to change notification settings - Fork 119
/
Dockerfile
84 lines (64 loc) · 2.55 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
81
82
83
84
ARG GENOMAD_VER="1.8.1"
ARG ARAGORN_VER="1.2.41"
ARG MMSEQS2_VER="15-6f452"
FROM ubuntu:jammy as builder
ARG ARAGORN_VER
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libc6-dev \
make \
gcc \
wget
# get ARAGORN
RUN wget -q https://www.trna.se/ARAGORN/Downloads/aragorn${ARAGORN_VER}.c && \
gcc -O3 -ffast-math -finline-functions -o aragorn aragorn${ARAGORN_VER}.c && \
/aragorn -h
FROM ubuntu:jammy as app
ARG GENOMAD_VER
ARG MMSEQS2_VER
# 'LABEL' instructions tag the image with metadata that might be important to the user
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="geNomad"
LABEL software.version="${GENOMAD_VER}"
LABEL description="Identification of mobile genetic elements"
LABEL website="https://github.com/apcamargo/genomad"
LABEL license="https://github.com/apcamargo/genomad/blob/main/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"
COPY --from=builder /aragorn /usr/local/bin/
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
procps \
python3 \
python3-pip \
wget && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
# get MMSEQS2
RUN wget -q https://github.com/soedinglab/MMseqs2/releases/download/${MMSEQS2_VER}/mmseqs-linux-avx2.tar.gz && \
tar -xvf mmseqs-linux-avx2.tar.gz && \
rm mmseqs-linux-avx2.tar.gz
# get genomad
RUN wget -q https://github.com/apcamargo/genomad/archive/refs/tags/v${GENOMAD_VER}.tar.gz && \
python3 -m pip install --no-cache-dir v${GENOMAD_VER}.tar.gz && \
rm -rf v${GENOMAD_VER}.tar.gz && \
mkdir /data
ENV PATH="/mmseqs/bin:$PATH" LC_ALL=C
# downloads latest database, which is version 1.7 and about ~1.6 G in size
RUN genomad download-database .
# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.'
CMD genomad --help
# 'WORKDIR' sets working directory
WORKDIR /data
FROM app as test
# set working directory so that all test inputs & outputs are kept in /test
WORKDIR /test
RUN genomad --help && \
genomad --version && \
aragorn -h && \
mmseqs -h
# downloads genome from NCBI and runs end-to-end (which looks like all steps) on the downloaded fasta
RUN pip list && \
wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/025/259/185/GCA_025259185.1_ASM2525918v1/GCA_025259185.1_ASM2525918v1_genomic.fna.gz && \
gunzip GCA_025259185.1_ASM2525918v1_genomic.fna.gz && \
genomad end-to-end GCA_025259185.1_ASM2525918v1_genomic.fna test /genomad_db --splits 16