Skip to content

Commit 218e045

Browse files
authored
Consolidate repo download with later usage
This mirrors the existing pattern of WORKDIR+RUN for each tool in the "build from source" section. Also makes it easier to move things around if needed.
1 parent c9d1bca commit 218e045

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

Dockerfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,32 +159,31 @@ RUN curl -fsSL -o /final/bin/nextclade2 https://github.com/nextstrain/nextclade/
159159
&& ln -sv nextclade2 /final/bin/nextclade
160160

161161
# Fauna
162-
RUN /builder-scripts/download-repo https://github.com/nextstrain/fauna master /nextstrain/fauna
162+
WORKDIR /nextstrain/fauna
163+
RUN /builder-scripts/download-repo https://github.com/nextstrain/fauna master . \
164+
&& pip3 install --requirement=requirements.txt
163165

164166
# Augur
165-
RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/builder-scripts/latest-augur-release-tag)" /nextstrain/augur
166-
167-
# Auspice
168-
RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release /nextstrain/auspice
169-
170-
# Install Fauna deps
171-
RUN pip3 install --requirement=/nextstrain/fauna/requirements.txt
172-
173167
# Augur is an editable install so we can overlay the augur version in the image
174168
# with --volume=.../augur:/nextstrain/augur and still have it globally
175169
# accessible and importable.
176-
RUN pip3 install --editable "/nextstrain/augur"
170+
WORKDIR /nextstrain/augur
171+
RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/builder-scripts/latest-augur-release-tag)" . \
172+
&& pip3 install --editable .
177173

178174
# pysam (for ncov/Pangolin)
179175
RUN pip3 install pysam
180176

177+
# Auspice
181178
# Install Node deps, build Auspice, and link it into the global search path. A
182179
# fresh install is only ~40 seconds, so we're not worrying about caching these
183180
# as we did the Python deps. Building auspice means we can run it without
184181
# hot-reloading, which is time-consuming and generally unnecessary in the
185182
# container image. Linking is equivalent to an editable Python install and
186183
# used for the same reasons described above.
187-
RUN cd /nextstrain/auspice && npm update && npm install && npm run build && npm link
184+
WORKDIR /nextstrain/auspice
185+
RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release . \
186+
&& npm update && npm install && npm run build && npm link
188187

189188
# ———————————————————————————————————————————————————————————————————— #
190189

0 commit comments

Comments
 (0)