-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (55 loc) · 2.44 KB
/
Dockerfile
File metadata and controls
69 lines (55 loc) · 2.44 KB
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
# sourced from https://github.com/StaPH-B/docker-builds/blob/master/dockerfile-template/Dockerfile_mamba
FROM mambaorg/micromamba:2.5.0-ubuntu24.04 AS app
ARG SEQSENDER_VERSION=1.3.9
# build and run as root users since micromamba image has 'mambauser' set as the $USER
USER root
# set workdir to default for building; set to /data at the end
WORKDIR /
LABEL base.image="mambaorg/micromamba:2.5.0-ubuntu24.04"
LABEL dockerfile.version="1"
LABEL software="SeqSender"
LABEL software.version="${SEQSENDER_VERSION}"
LABEL description="Python program that automates the process of generating submission files and batch uploading to NCBI archives and GISAID databases"
LABEL website="https://github.com/CDCgov/seqsender"
LABEL license="https://github.com/CDCgov/seqsender/blob/master/LICENSE"
LABEL maintainer="Vincent Tu"
LABEL maintainer.email="vincent.tu@phila.gov"
# install dependencies and cleanup apt garbage
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
procps \
libsqlite3-0 && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
# download source code; make /data
RUN wget -q https://github.com/CDCgov/seqsender/archive/refs/tags/v${SEQSENDER_VERSION}.tar.gz && \
tar -xzf v${SEQSENDER_VERSION}.tar.gz && \
rm -r v${SEQSENDER_VERSION}.tar.gz && \
mkdir /data
# set PATH and locale settings for singularity
ENV LC_ALL=C.UTF-8 \
PATH=/opt/conda/bin/:${PATH}:/seqsender-${SEQSENDER_VERSION}
# increase number of open files
# install software into the base micromamba environment, pinning the version
# clean up conda garbage
RUN micromamba install --yes --name base -f "/seqsender-${SEQSENDER_VERSION}/env.yaml" && \
micromamba clean --all --force-pkgs-dirs --yes
# default command is to pull up help options
CMD ["seqsender.py", "--help"]
# set working directory to /data
WORKDIR /data
# test layer
FROM app AS test
# print version and grep for it; if not found, exit with error
RUN seqsender.py --help && \
seqsender.py version | \
grep "Version: ${SEQSENDER_VERSION}" || exit 1
# generate test data for FLU and COV and check if directories are created; otherwise exit with error
RUN for org in FLU COV; \
do seqsender.py test_data -bsng --organism "${org}" --submission_dir test_dir && \
test -d "test_dir/${org}_TEST_DATA/" || exit 1; \
done
# test network connection
RUN seqsender.py test_network_connection | \
grep "No network connection issues detected" || exit 1
RUN micromamba list -n base