diff --git a/Dockerfile b/Dockerfile index d1c2cbee..ce345fa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,21 +21,21 @@ SHELL ["/bin/bash", "-e", "-u", "-o", "pipefail", "-c"] # zlib1g-dev: for building VCFtools and pyfastx; may be used by package managers to build from source # nodejs: for installing Auspice RUN apt-get update && apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - build-essential \ - ca-certificates \ - curl \ - git \ - jq \ - libsqlite3-dev \ - pkg-config \ - zlib1g-dev + autoconf \ + automake \ + build-essential \ + ca-certificates \ + curl \ + git \ + jq \ + libsqlite3-dev \ + pkg-config \ + zlib1g-dev # Install a specific Node.js version # https://github.com/nodesource/distributions/blob/0d81da75/README.md#installation-instructions RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \ - && apt-get update && apt-get install -y nodejs + && apt-get update && apt-get install -y nodejs # Used for platform-specific instructions ARG TARGETPLATFORM @@ -70,17 +70,17 @@ RUN curl -fsSL https://api.github.com/repos/nextstrain/standard-RAxML/tarball/46 WORKDIR /build/FastTree RUN curl -fsSL https://api.github.com/repos/tsibley/FastTree/tarball/50c5b098ea085b46de30bfc29da5e3f113353e6f \ | tar xzvpf - --no-same-owner --strip-components=1 \ - && make FastTreeDblMP \ - && cp -p FastTreeDblMP /final/bin + && make FastTreeDblMP \ + && cp -p FastTreeDblMP /final/bin # Build vcftools WORKDIR /build/vcftools RUN curl -fsSL https://github.com/vcftools/vcftools/releases/download/v0.1.16/vcftools-0.1.16.tar.gz \ | tar xzvpf - --no-same-owner --strip-components=2 \ - && ./configure --prefix=$PWD/built \ - && make && make install \ - && cp -rp built/bin/* /final/bin \ - && cp -rp built/share/* /final/share + && ./configure --prefix=$PWD/built \ + && make && make install \ + && cp -rp built/bin/* /final/bin \ + && cp -rp built/share/* /final/share # 2. Download pre-built programs @@ -93,8 +93,8 @@ RUN curl -fsSL https://github.com/vcftools/vcftools/releases/download/v0.1.16/vc WORKDIR /download/mafft RUN curl -fsSL https://mafft.cbrc.jp/alignment/software/mafft-7.520-linux.tgz \ | tar xzvpf - --no-same-owner --strip-components=2 mafft-linux64/mafftdir/ \ - && cp -p bin/* /final/bin \ - && cp -p libexec/* /final/libexec + && cp -p bin/* /final/bin \ + && cp -p libexec/* /final/libexec # Download IQ-TREE # NOTE: Running this program requires support for emulation on the Docker host @@ -104,7 +104,7 @@ RUN curl -fsSL https://mafft.cbrc.jp/alignment/software/mafft-7.520-linux.tgz \ WORKDIR /download/IQ-TREE RUN curl -fsSL https://github.com/iqtree/iqtree2/releases/download/v2.2.2.4/iqtree-2.2.2.4-Linux.tar.gz \ | tar xzvpf - --no-same-owner --strip-components=1 \ - && mv bin/iqtree2 /final/bin/iqtree + && mv bin/iqtree2 /final/bin/iqtree # Download Nextalign v1 # NOTE: Running this program requires support for emulation on the Docker host @@ -123,8 +123,8 @@ RUN curl -fsSL -o /final/bin/nextclade1 https://github.com/nextstrain/nextclade/ # if the processor architecture is not amd64. # TODO: Build from source to avoid emulation. Instructions: https://github.com/eBay/tsv-utils/tree/v2.2.0#build-from-source-files RUN curl -L -o tsv-utils.tar.gz https://github.com/eBay/tsv-utils/releases/download/v2.2.0/tsv-utils-v2.2.0_linux-x86_64_ldc2.tar.gz \ - && tar -x --no-same-owner -v -C /final/bin -z --strip-components 2 --wildcards -f tsv-utils.tar.gz "*/bin/*" \ - && rm -f tsv-utils.tar.gz + && tar -x --no-same-owner -v -C /final/bin -z --strip-components 2 --wildcards -f tsv-utils.tar.gz "*/bin/*" \ + && rm -f tsv-utils.tar.gz # Download csvtk RUN curl -L https://github.com/shenwei356/csvtk/releases/download/v0.25.0/csvtk_${TARGETOS}_${TARGETARCH}.tar.gz | tar xz --no-same-owner -C /final/bin @@ -162,22 +162,22 @@ RUN curl -fsSL https://github.com/lh3/minimap2/releases/download/v2.26/minimap2- # ¹ https://cvxopt.org/install/#building-and-installing-from-source # ² https://github.com/cvxopt/cvxopt/issues/125#issuecomment-407396491 RUN if [[ "$TARGETPLATFORM" == linux/arm64 ]]; then \ - apt-get update && apt-get install -y --no-install-recommends \ - libopenblas-dev \ - libsuitesparse-dev \ - && CVXOPT_SUITESPARSE_INC_DIR=/usr/include/suitesparse \ - pip3 install cvxopt \ - ; \ - fi + apt-get update && apt-get install -y --no-install-recommends \ + libopenblas-dev \ + libsuitesparse-dev \ + && CVXOPT_SUITESPARSE_INC_DIR=/usr/include/suitesparse \ + pip3 install cvxopt \ + ; \ + fi # Install jaxlib on linux/arm64 # jaxlib, an evofr dependency, does not have official pre-built binaries for # linux/arm64. A GitHub user has provided them in a fork repo. # https://github.com/google/jax/issues/7097#issuecomment-1110730040 RUN if [[ "$TARGETPLATFORM" == linux/arm64 ]]; then \ - pip3 install https://github.com/yoziru/jax/releases/download/jaxlib-v0.4.6/jaxlib-0.4.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl \ - ; \ - fi + pip3 install https://github.com/yoziru/jax/releases/download/jaxlib-v0.4.6/jaxlib-0.4.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl \ + ; \ + fi # Install envdir, which is used by pathogen builds RUN pip3 install envdir==1.0.1 @@ -186,8 +186,7 @@ RUN pip3 install envdir==1.0.1 RUN pip3 install awscli==1.27.126 # Install Snakemake and related optional dependencies. -# Pinned to 7.24.1 for stability (2023-03-13) -RUN pip3 install snakemake==7.24.1 +RUN pip3 install snakemake==7.25.2 # Google Cloud Storage package is required for Snakemake to fetch remote files # from Google Storage URIs. RUN pip3 install google-cloud-storage==2.7.0 @@ -225,17 +224,17 @@ COPY builder-scripts/ /builder-scripts/ # Download Nextalign v2 # Set default Nextalign version to 2 RUN curl -fsSL -o /final/bin/nextalign2 https://github.com/nextstrain/nextclade/releases/latest/download/nextalign-$(/builder-scripts/target-triple) \ - && ln -sv nextalign2 /final/bin/nextalign + && ln -sv nextalign2 /final/bin/nextalign # Download Nextclade v2 # Set default Nextclade version to 2 RUN curl -fsSL -o /final/bin/nextclade2 https://github.com/nextstrain/nextclade/releases/latest/download/nextclade-$(/builder-scripts/target-triple) \ - && ln -sv nextclade2 /final/bin/nextclade + && ln -sv nextclade2 /final/bin/nextclade # Fauna WORKDIR /nextstrain/fauna RUN /builder-scripts/download-repo https://github.com/nextstrain/fauna master . \ - && pip3 install --requirement=requirements.txt + && pip3 install --requirement=requirements.txt # Add Treetime RUN pip3 install phylo-treetime @@ -246,7 +245,7 @@ RUN pip3 install phylo-treetime # accessible and importable. WORKDIR /nextstrain/augur RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/builder-scripts/latest-augur-release-tag)" . \ - && pip3 install --editable . + && pip3 install --editable . # Auspice # Install Node deps, build Auspice, and link it into the global search path. A @@ -257,7 +256,7 @@ RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/build # used for the same reasons described above. WORKDIR /nextstrain/auspice RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release . \ - && npm update && npm install && npm run build && npm link + && npm update && npm install && npm run build && npm link # Add evofr for forecasting RUN pip3 install evofr @@ -288,28 +287,28 @@ SHELL ["/bin/bash", "-e", "-u", "-o", "pipefail", "-c"] # zlib1g: for pyfastx (for Augur) # nodejs: for running Auspice RUN apt-get update && apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - curl \ - dos2unix \ - gzip \ - jq \ - less \ - libgomp1 \ - libsqlite3-0 \ - perl \ - ruby \ - util-linux \ - wget \ - xz-utils \ - zip unzip \ - zlib1g \ - zstd + bzip2 \ + ca-certificates \ + curl \ + dos2unix \ + gzip \ + jq \ + less \ + libgomp1 \ + libsqlite3-0 \ + perl \ + ruby \ + util-linux \ + wget \ + xz-utils \ + zip unzip \ + zlib1g \ + zstd # Install a specific Node.js version # https://github.com/nodesource/distributions/blob/0d81da75/README.md#installation-instructions RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \ - && apt-get update && apt-get install -y nodejs + && apt-get update && apt-get install -y nodejs # Configure bash for interactive usage COPY bashrc /etc/bash.bashrc @@ -338,16 +337,16 @@ COPY --from=builder /usr/local/lib/python3.10/site-packages/ /usr/local/lib/pyth # troublesome or excessive. # -trs, 15 June 2018 COPY --from=builder \ - /usr/local/bin/augur \ - /usr/local/bin/aws \ - /usr/local/bin/envdir \ - /usr/local/bin/nextstrain \ - /usr/local/bin/pangolin \ - /usr/local/bin/pangolearn.smk \ - /usr/local/bin/scorpio \ - /usr/local/bin/snakemake \ - /usr/local/bin/treetime \ - /usr/local/bin/ + /usr/local/bin/augur \ + /usr/local/bin/aws \ + /usr/local/bin/envdir \ + /usr/local/bin/nextstrain \ + /usr/local/bin/pangolin \ + /usr/local/bin/pangolearn.smk \ + /usr/local/bin/scorpio \ + /usr/local/bin/snakemake \ + /usr/local/bin/treetime \ + /usr/local/bin/ # Add installed Node libs COPY --from=builder /usr/lib/node_modules/ /usr/lib/node_modules/ @@ -373,11 +372,11 @@ ENV HOME=/nextstrain # Setup a non-root user for optional use RUN useradd nextstrain \ - --system \ - --user-group \ - --shell /bin/bash \ - --home-dir /nextstrain \ - --no-log-init + --system \ + --user-group \ + --shell /bin/bash \ + --home-dir /nextstrain \ + --no-log-init # The host should bind mount the pathogen build dir into /nextstrain/build. WORKDIR /nextstrain/build