Skip to content

Commit d041d6c

Browse files
committed
Isolate AWS CLI (v1) into its own Python venv
Otherwise, the awscli → botocore dependency is broken by the subsequent installation of the nextstrain-cli → botocore dependency, which results in --no-sign-request not working as it should. This approach seemed like the option of least change. Alternatives to and/or additional improvements to this include a) installing Nextstrain CLI in its own venv instead/as well, b) upgrading to AWS CLI v2 (which is always isolated) or c) updating the nextstrain-cli → botocore dependency to not conflict. Resolves: <#213> Related-to: <#214>
1 parent 822a459 commit d041d6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
253253
RUN pip3 install envdir==1.0.1
254254

255255
# Install tooling for our AWS Batch builds, which use `aws s3`.
256-
RUN pip3 install awscli==1.18.195
256+
RUN python3 -m venv /usr/local/libexec/awscli \
257+
&& /usr/local/libexec/awscli/bin/python -m pip install awscli==1.18.195 \
258+
&& ln -sv /usr/local/libexec/awscli/bin/aws /usr/local/bin/aws
257259

258260
# Install Snakemake and related optional dependencies.
259261
# Pinned to 7.32.3 for stability (2023-09-09)
@@ -425,6 +427,9 @@ RUN chmod a+rx /usr/local/bin/* /usr/local/libexec/*
425427
# Add installed Python libs
426428
COPY --from=builder-target-platform /usr/local/lib/python3.10/site-packages/ /usr/local/lib/python3.10/site-packages/
427429

430+
# AWS CLI
431+
COPY --from=builder-target-platform /usr/local/libexec/awscli/ /usr/local/libexec/awscli/
432+
428433
# Add installed Python scripts that we need.
429434
#
430435
# XXX TODO: This isn't great. It's prone to needing manual updates because it

0 commit comments

Comments
 (0)