-
Notifications
You must be signed in to change notification settings - Fork 8
Update AWS CLI to v2 #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AWS CLI to v2 #287
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ COPY --from=xx / / | |
| # make: used for building from Makefiles (search for usage); may be used by package managers to build from source | ||
| # nodejs: for installing Auspice | ||
| # clang: for compiling C/C++ projects; may be used by package managers to build from source | ||
| # unzip: for AWS CLI | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| autoconf \ | ||
| automake \ | ||
|
|
@@ -36,7 +37,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | ||
| git \ | ||
| make \ | ||
| dpkg-dev | ||
| dpkg-dev \ | ||
| unzip | ||
|
|
||
| # Install a specific Node.js version | ||
| # https://github.com/nodesource/distributions/blob/ba48c1fe6e843e9ffb60aefc5da5d00234c83f04/README.md#using-debian-as-root-nodejs-20 | ||
|
|
@@ -208,6 +210,14 @@ RUN curl -fsSL https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/v2/linux-$ | |
| RUN curl -fsSL https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/v2/linux-${TARGETARCH}/dataformat \ | ||
| -o /final/bin/dataformat | ||
|
|
||
| # Install tooling for our AWS Batch builds, which use `aws s3`. | ||
| # Using `xx-info march` to translate amd64 -> x86_64 and arm64 -> aarch64 | ||
| # based on https://github.com/docker/buildx/discussions/2001 | ||
| RUN XX_MARCH=$(xx-info march) \ | ||
| && curl -fsSL --proto '=https' "https://awscli.amazonaws.com/awscli-exe-linux-${XX_MARCH}.zip" -o "awscliv2.zip" \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm guessing there's a good amount of AWS CLI usage not captured by pathogen repo CI (e.g. upload-to-s3), but we can just merge and monitor.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No obvious errors in today's pathogen workflows, will continue to monitor the rest of the week. |
||
| && unzip awscliv2.zip "aws/dist/*" -d /final/libexec/aws-cli \ | ||
| && ln -srv /final/libexec/aws-cli/aws/dist/aws /final/bin/aws | ||
|
|
||
| # ———————————————————————————————————————————————————————————————————— # | ||
|
|
||
| # Define a builder stage that runs on the target platform. | ||
|
|
@@ -244,11 +254,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| # Install envdir, which is used by pathogen builds | ||
| RUN pip3 install envdir==1.0.1 | ||
|
|
||
| # Install tooling for our AWS Batch builds, which use `aws s3`. | ||
| RUN python3 -m venv /usr/local/libexec/awscli \ | ||
| && /usr/local/libexec/awscli/bin/python -m pip install awscli==1.18.195 \ | ||
| && ln -sv /usr/local/libexec/awscli/bin/aws /usr/local/bin/aws | ||
|
|
||
| # Install Snakemake and related optional dependencies. | ||
| # Pinned to 9.6.2 for stability (latest version on 2025-07-03) | ||
| RUN pip3 install snakemake[reports]==9.6.2 | ||
|
|
@@ -388,9 +393,6 @@ RUN chmod a+rx /usr/local/bin/* /usr/local/libexec/* | |
| # Add installed Python libs | ||
| COPY --from=builder-target-platform /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/ | ||
|
|
||
| # AWS CLI | ||
| COPY --from=builder-target-platform /usr/local/libexec/awscli/ /usr/local/libexec/awscli/ | ||
|
|
||
| # Add installed Python scripts that we need. | ||
| # | ||
| # XXX TODO: This isn't great. It's prone to needing manual updates because it | ||
|
|
@@ -402,7 +404,6 @@ COPY --from=builder-target-platform /usr/local/libexec/awscli/ /usr/local/libexe | |
| # -trs, 15 June 2018 | ||
| COPY --from=builder-target-platform \ | ||
| /usr/local/bin/augur \ | ||
| /usr/local/bin/aws \ | ||
| /usr/local/bin/bio \ | ||
| /usr/local/bin/envdir \ | ||
| /usr/local/bin/evofr \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find, this can probably replace builder-scripts/target-triple elsewhere.