forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
64 lines (48 loc) · 1.89 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
ARG SYLPH_VER="0.5.1"
## Builder ##
FROM rust:1.74 as builder
ARG SYLPH_VER
RUN apt update && \
apt install -y cmake && \
wget -q https://github.com/bluenote-1577/sylph/archive/refs/tags/v${SYLPH_VER}.tar.gz && \
tar -xvf v${SYLPH_VER}.tar.gz && \
cd sylph-${SYLPH_VER} && \
cargo install --path . --root ~/.cargo && \
chmod +x /root/.cargo/bin/sylph
## App ##
FROM ubuntu:jammy as app
ARG SYLPH_VER
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="sylph"
LABEL software.version=${SYLPH_VER}
LABEL description="sylph is a program that can perform ultrafast (1) ANI querying or (2) metagenomic profiling for metagenomic shotgun samples."
LABEL website="https://github.com/bluenote-1577/sylph"
LABEL license="https://github.com/bluenote-1577/sylph/blob/main/LICENSE"
LABEL maintainer="Stephen Turner"
LABEL maintainer.email="[email protected]"
# copy app from builder stage
COPY --from=builder /root/.cargo/bin/sylph /usr/local/bin/sylph
# default run command
CMD sylph -h
# singularity compatibility
ENV LC_ALL=C
# final working directory in app layer is /data
WORKDIR /data
## Test ##
FROM app as test
# making sure sylph is in PATH
RUN sylph -h
ARG SYLPH_VER
RUN apt update && apt install -y wget
RUN wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/e.coli-EC590.fasta && \
wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/e.coli-K12.fasta && \
wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/e.coli-o157.fasta && \
wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/o157_reads.fastq
RUN date && \
sylph sketch -i e.coli-*.fasta -o database && \
sylph sketch o157_reads.fastq && \
sylph query database.syldb *.sylsp > ani_queries.tsv && \
sylph profile database.syldb *.sylsp > profiling.tsv && \
cat *.tsv && \
date