Duke University, Department of Biostatistics & Bioinformatics
2023-09-14
Reproducibility of computational research faces four major challenges1:
Container definition files are simple text files:
FROM ubuntu:20.04
# formerly LABEL maintainer="john.bradley@duke.edu"
LABEL org.opencontainers.image.authors="john.bradley@duke.edu"
# picard requires java
RUN apt-get update && apt-get install -y \
wget \
openjdk-8-jre-headless
# Installs fastqc from compiled java distribution into /opt/FastQC
ENV PICARD_VERSION="2.10.7"
ENV PICARD_URL https://github.com/broadinstitute/picard/releases/download/${PICARD_VERSION}/picard.jar
WORKDIR /opt/picard
RUN wget $PICARD_URL
CMD ["java", "-jar", "picard.jar"]
singularity build
normally requires sudo
privilegesCan download and run in one step:
--fakeroot
for singularity build
in a non-privileged environmentRequires bind mount at container runtime (docker run
):
--volume <local-path>:<container-path>
(Docker)--bind <local-path>:<container-path>
(Singularity)--mount
generates an error if target directory (or file) doesn’t exist