Skip to content

Commit

Permalink
Omit dev deps when installing Auspice
Browse files Browse the repository at this point in the history
This avoids disk-heavy deps like Puppeteer, which bundle a whole
Chromium install.  Based on some rough comparisons, I expected this to
shave about 600MB from the uncompressed image size and a local test
build bore that out.

The node_modules/ tree is infamously large and bloated.  The usual
culprits are non-source files that are commonly included in package
distributions but not needed at run time.  So there is surely more we
could shave off here, but this is a huge easy start.
  • Loading branch information
tsibley committed Jun 23, 2023
1 parent d20eff7 commit d5d1662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ RUN curl -fsSL -o /final/bin/nextclade2 https://github.com/nextstrain/nextclade/
# ⁴ https://github.com/mapbox/node-pre-gyp/blob/v1.0.10/lib/node-pre-gyp.js#L186
WORKDIR /nextstrain/auspice
RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release . \
&& npm install && npm link
&& npm install --omit dev && npm link

# Add NCBI Datasets command line tools for access to NCBI Datsets Virus Data Packages
RUN curl -fsSL -o /final/bin/datasets https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/v2/linux-${TARGETARCH}/datasets
Expand Down

0 comments on commit d5d1662

Please sign in to comment.