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 cde8ff4 commit 693d639
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 @@ -261,7 +261,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 install && npm run build && npm link
&& npm install --omit dev && npm run build && npm link

# Add evofr for forecasting
RUN pip3 install evofr
Expand Down

0 comments on commit 693d639

Please sign in to comment.