@@ -150,6 +150,9 @@ RUN pip3 install git+https://github.com/cov-lineages/pango-designation.git@19d9a
150150# docker build --build-arg CACHE_DATE="$(date)"
151151ARG CACHE_DATE
152152
153+ # Add helper scripts
154+ COPY builder-scripts/ /builder-scripts/
155+
153156# Nextclade/Nextalign v2 are downloaded directly but using the latest version,
154157# so they belong after CACHE_DATE (unlike Nextclade/Nextalign v1).
155158
@@ -163,36 +166,32 @@ RUN curl -fsSL -o /final/bin/nextalign2 https://github.com/nextstrain/nextclade/
163166RUN curl -fsSL -o /final/bin/nextclade2 https://github.com/nextstrain/nextclade/releases/latest/download/nextclade-x86_64-unknown-linux-gnu \
164167 && ln -sv nextclade2 /final/bin/nextclade
165168
166- # Add helpers for build
167- COPY builder-scripts/download-repo builder-scripts/latest-augur-release-tag /builder-scripts/
168-
169169# Fauna
170- RUN /builder-scripts/download-repo https://github.com/nextstrain/fauna master /nextstrain/fauna
170+ WORKDIR /nextstrain/fauna
171+ RUN /builder-scripts/download-repo https://github.com/nextstrain/fauna master . \
172+ && pip3 install --requirement=requirements.txt
171173
172174# Augur
173- RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/builder-scripts/latest-augur-release-tag)" /nextstrain/augur
174-
175- # Auspice
176- RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release /nextstrain/auspice
177-
178- # Install Fauna deps
179- RUN pip3 install --requirement=/nextstrain/fauna/requirements.txt
180-
181175# Augur is an editable install so we can overlay the augur version in the image
182176# with --volume=.../augur:/nextstrain/augur and still have it globally
183177# accessible and importable.
184- RUN pip3 install --editable "/nextstrain/augur"
178+ WORKDIR /nextstrain/augur
179+ RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/builder-scripts/latest-augur-release-tag)" . \
180+ && pip3 install --editable .
185181
186182# pysam (for ncov/Pangolin)
187183RUN pip3 install pysam
188184
185+ # Auspice
189186# Install Node deps, build Auspice, and link it into the global search path. A
190187# fresh install is only ~40 seconds, so we're not worrying about caching these
191188# as we did the Python deps. Building auspice means we can run it without
192189# hot-reloading, which is time-consuming and generally unnecessary in the
193190# container image. Linking is equivalent to an editable Python install and
194191# used for the same reasons described above.
195- RUN cd /nextstrain/auspice && npm update && npm install && npm run build && npm link
192+ WORKDIR /nextstrain/auspice
193+ RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release . \
194+ && npm update && npm install && npm run build && npm link
196195
197196# ———————————————————————————————————————————————————————————————————— #
198197
0 commit comments