Skip to content

Commit

Permalink
Add comment on Auspice cross-compilation
Browse files Browse the repository at this point in the history
Pure JavaScript packages (including Auspice) are not platform-specific.

Evidence that the arm64 image variant of build-20230621T190343Z (latest
tagged build) does not have any platform-specific Auspice runtime
dependencies:

    $ apt-get update && apt-get install file -y
    $ find /nextstrain/auspice/node_modules -executable -type f -exec file {} + | grep 64 | sed -e 's=^/nextstrain/auspice/node_modules/=='

    node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier:                        Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>
    node-notifier/vendor/notifu/notifu64.exe:                                                                       PE32+ executable (GUI) x86-64, for MS Windows
    puppeteer/.local-chromium/linux-722234/chrome-linux/nacl_irt_x86_64.nexe:                                       ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=7aeb4f45ea5cec7d8e4184264ad39f0f77bcaee2, stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/nacl_helper_bootstrap:                                      ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=5c5f3935c8f8a15ba325f0d73dfa585fa9390cf9, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/ClearKeyCdm/_platform_specific/linux_x64/libclearkeycdm.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/libEGL.so:                                                  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/crashpad_handler:                                           ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/chrome_sandbox:                                             ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/chrome:                                                     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/libGLESv2.so:                                               ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/swiftshader/libEGL.so:                                      ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/swiftshader/libGLESv2.so:                                   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
    puppeteer/.local-chromium/linux-722234/chrome-linux/nacl_helper:                                                ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
  • Loading branch information
victorlin committed Jun 22, 2023
1 parent b78680c commit deabcc1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,19 @@ RUN curl -fsSL -o /final/bin/nextclade2 https://github.com/nextstrain/nextclade/
# Linking is used so we can overlay the auspice version in the image with
# --volume=.../auspice:/nextstrain/auspice and still have it globally accessible
# and importable.
#
# Versions of NPM might differ in platform between where Auspice is installed
# and where it is used (the final image). This does not matter since Auspice
# (and its runtime dependencies at the time of writing) are not
# platform-specific.
# This may change in the future, which would call for cross-platform
# installation using npm_config_arch (if using node-gyp¹ or prebuild-install²)
# or npm_config_target_arch (if using node-pre-gyp³⁴).
#
# ¹ https://github.com/nodejs/node-gyp#environment-variables
# ² https://github.com/prebuild/prebuild-install#help
# ³ https://github.com/mapbox/node-pre-gyp#options
# ⁴ 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 update && npm install && npm run build && npm link
Expand Down

0 comments on commit deabcc1

Please sign in to comment.