|
| 1 | +FROM mambaorg/micromamba:2.5.0-ubuntu24.04 AS app |
| 2 | + |
| 3 | +# Version arguments |
| 4 | +# ARG variables only persist during build time |
| 5 | +ARG POPPUNK_VERSION="2.7.8" |
| 6 | + |
| 7 | +# build and run as root users since micromamba image has 'mambauser' set as the $USER |
| 8 | +USER root |
| 9 | +# set workdir to default for building; set to /data at the end |
| 10 | +WORKDIR / |
| 11 | + |
| 12 | +LABEL base.image="mambaorg/micromamba:2.5.0-ubuntu24.04" |
| 13 | +LABEL dockerfile.version="1" |
| 14 | +LABEL software="PopPUNK" |
| 15 | +LABEL software.version=${POPPUNK_VERSION} |
| 16 | +LABEL description="POPulation Partitioning Using Nucleotide Kmers" |
| 17 | +LABEL website="https://github.com/bacpop/PopPUNK" |
| 18 | +LABEL license="https://github.com/bacpop/PopPUNK/blob/master/LICENSE" |
| 19 | +LABEL maintainer="Curtis Kapsak" |
| 20 | +LABEL maintainer.email="curtis.kapsak@theiagen.com" |
| 21 | +LABEL maintainer2="Harry Hung" |
| 22 | +LABEL maintainer2.email="ch31@sanger.ac.uk" |
| 23 | + |
| 24 | +# install dependencies; cleanup apt garbage |
| 25 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 26 | + wget \ |
| 27 | + ca-certificates \ |
| 28 | + procps && \ |
| 29 | + apt-get autoclean && rm -rf /var/lib/apt/lists/* |
| 30 | + |
| 31 | +# Using an older version of setuptools. Current throws an error in the docker (Feb 2026) |
| 32 | +RUN micromamba create -n poppunk-env -c conda-forge -c bioconda \ |
| 33 | + poppunk=${POPPUNK_VERSION} \ |
| 34 | + setuptools=81.0.0 && \ |
| 35 | + micromamba clean -a -f -y |
| 36 | + |
| 37 | +# set the environment, put new conda env in PATH by default; set locales to UTF-8 |
| 38 | +ENV PATH="/opt/conda/envs/poppunk-env/bin:${PATH}" \ |
| 39 | + LC_ALL=C.UTF-8 |
| 40 | + |
| 41 | +# set working directory to /data |
| 42 | +WORKDIR /data |
| 43 | + |
| 44 | +CMD ["poppunk", "--help"] |
| 45 | + |
| 46 | +# new base for testing |
| 47 | +FROM app AS test |
| 48 | + |
| 49 | +# print out various help options and version |
| 50 | +RUN poppunk --help && \ |
| 51 | + poppunk_assign --help && \ |
| 52 | + poppunk_visualise --help && \ |
| 53 | + poppunk_mst --help && \ |
| 54 | + poppunk_references --help && \ |
| 55 | + poppunk_info --help && \ |
| 56 | + poppunk_mandrake --help && \ |
| 57 | + poppunk --version |
| 58 | + |
| 59 | +# Download 100 S. Pneumo assemblies from GPS Public Data on ENA |
| 60 | +# Build PopPUNK database from the assemblies |
| 61 | +# Assign clusters on the same assemblies using the built database |
| 62 | +# Compare the database clusters and assigned clusters of the assemblies |
| 63 | +RUN wget https://raw.githubusercontent.com/StaPH-B/docker-builds/refs/heads/master/build-files/poppunk/2.7.5/ftps.txt && \ |
| 64 | + wget https://raw.githubusercontent.com/StaPH-B/docker-builds/refs/heads/master/build-files/poppunk/2.7.5/test.sh && \ |
| 65 | + bash test.sh && cmp assigned.csv database.csv |
| 66 | + |
| 67 | +RUN micromamba list -n poppunk-env |
0 commit comments