Skip to content

Commit

Permalink
Update snakemake to v7.25.2
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed May 4, 2023
1 parent 30e6c07 commit c74d05c
Showing 1 changed file with 71 additions and 72 deletions.
143 changes: 71 additions & 72 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand All @@ -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
Expand Down

0 comments on commit c74d05c

Please sign in to comment.