Skip to content

Commit

Permalink
☁️ Add AWS CLI (#54)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <[email protected]>
  • Loading branch information
jacobwoffenden authored Dec 6, 2024
1 parent 53fe27a commit 01ef417
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV CONTAINER_USER="analyticalplatform" \
ANALYTICAL_PLATFORM_DIRECTORY="/opt/analytical-platform" \
DEBIAN_FRONTEND="noninteractive" \
PIP_BREAK_SYSTEM_PACKAGES="1" \
AWS_CLI_VERSION="2.22.12" \
CUDA_VERSION="12.6.1" \
NVIDIA_DISABLE_REQUIRE="true" \
NVIDIA_CUDA_CUDART_VERSION="12.6.77-1" \
Expand Down Expand Up @@ -63,6 +64,28 @@ rm --force --recursive /var/lib/apt/lists/*
install --directory --owner "${CONTAINER_USER}" --group "${CONTAINER_GROUP}" --mode 0755 "${ANALYTICAL_PLATFORM_DIRECTORY}"
EOF

# AWS CLI
COPY --chown=nobody:nogroup --chmod=0644 src/opt/aws-cli/[email protected] /opt/aws-cli/[email protected]
RUN <<EOF
gpg --import /opt/aws-cli/[email protected]

curl --location --fail-with-body \
"https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip.sig" \
--output "awscliv2.sig"

curl --location --fail-with-body \
"https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip" \
--output "awscliv2.zip"

gpg --verify awscliv2.sig awscliv2.zip

unzip awscliv2.zip

./aws/install

rm --force --recursive awscliv2.sig awscliv2.zip aws
EOF

# NVIDIA CUDA
RUN <<EOF
curl --location --fail-with-body \
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This repository contains the code for building the Python base image used by Ana

This image is built on Ubuntu 24.04 LTS and includes the following software:

- AWS CLI

- Python 3.12

- NVIDIA CUDA drivers
Expand Down Expand Up @@ -60,6 +62,10 @@ apt-get update
apt-cache policy ${PACKAGE} # for example curl, git or gpg
```

### AWS CLI

Releases for AWS CLI are provided on [GitHub](https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst)

### NVIDIA CUDA

The latest version of NVIDIA can be obtained by running:
Expand Down
29 changes: 29 additions & 0 deletions src/opt/aws-cli/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF2Cr7UBEADJZHcgusOJl7ENSyumXh85z0TRV0xJorM2B/JL0kHOyigQluUG
ZMLhENaG0bYatdrKP+3H91lvK050pXwnO/R7fB/FSTouki4ciIx5OuLlnJZIxSzx
PqGl0mkxImLNbGWoi6Lto0LYxqHN2iQtzlwTVmq9733zd3XfcXrZ3+LblHAgEt5G
TfNxEKJ8soPLyWmwDH6HWCnjZ/aIQRBTIQ05uVeEoYxSh6wOai7ss/KveoSNBbYz
gbdzoqI2Y8cgH2nbfgp3DSasaLZEdCSsIsK1u05CinE7k2qZ7KgKAUIcT/cR/grk
C6VwsnDU0OUCideXcQ8WeHutqvgZH1JgKDbznoIzeQHJD238GEu+eKhRHcz8/jeG
94zkcgJOz3KbZGYMiTh277Fvj9zzvZsbMBCedV1BTg3TqgvdX4bdkhf5cH+7NtWO
lrFj6UwAsGukBTAOxC0l/dnSmZhJ7Z1KmEWilro/gOrjtOxqRQutlIqG22TaqoPG
fYVN+en3Zwbt97kcgZDwqbuykNt64oZWc4XKCa3mprEGC3IbJTBFqglXmZ7l9ywG
EEUJYOlb2XrSuPWml39beWdKM8kzr1OjnlOm6+lpTRCBfo0wa9F8YZRhHPAkwKkX
XDeOGpWRj4ohOx0d2GWkyV5xyN14p2tQOCdOODmz80yUTgRpPVQUtOEhXQARAQAB
tCFBV1MgQ0xJIFRlYW0gPGF3cy1jbGlAYW1hem9uLmNvbT6JAlQEEwEIAD4CGwMF
CwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQT7Xbd/1cEYuAURraimMQrMRnJHXAUC
ZqFYbwUJCv/cOgAKCRCmMQrMRnJHXKYuEAC+wtZ611qQtOl0t5spM9SWZuszbcyA
0xBAJq2pncnp6wdCOkuAPu4/R3UCIoD2C49MkLj9Y0Yvue8CCF6OIJ8L+fKBv2DI
yWZGmHL0p9wa/X8NCKQrKxK1gq5PuCzi3f3SqwfbZuZGeK/ubnmtttWXpUtuU/Iz
VR0u/0sAy3j4uTGKh2cX7XnZbSqgJhUk9H324mIJiSwzvw1Ker6xtH/LwdBeJCck
bVBdh3LZis4zuD4IZeBO1vRvjot3Oq4xadUv5RSPATg7T1kivrtLCnwvqc6L4LnF
0OkNysk94L3LQSHyQW2kQS1cVwr+yGUSiSp+VvMbAobAapmMJWP6e/dKyAUGIX6+
2waLdbBs2U7MXznx/2ayCLPH7qCY9cenbdj5JhG9ibVvFWqqhSo22B/URQE/CMrG
+3xXwtHEBoMyWEATr1tWwn2yyQGbkUGANneSDFiTFeoQvKNyyCFTFO1F2XKCcuDs
19nj34PE2TJilTG2QRlMr4D0NgwLLAMg2Los1CK6nXWnImYHKuaKS9LVaCoC8vu7
IRBik1NX6SjrQnftk0M9dY+s0ZbAN1gbdjZ8H3qlbl/4TxMdr87m8LP4FZIIo261
Eycv34pVkCePZiP+dgamEiQJ7IL4ZArio9mv6HbDGV6mLY45+l6/0EzCwkI5IyIf
BfWC9s/USgxchg==
=ptgS
-----END PGP PUBLIC KEY BLOCK-----
5 changes: 5 additions & 0 deletions test/container-structure-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ commandTests:
args: ["--version"]
expectedOutput: ["pip 24.0"]

- name: "aws"
command: "aws"
args: ["--version"]
expectedOutput: ["aws-cli/2.22.12"]

fileExistenceTests:
- name: "/opt/analytical-platform"
path: "/opt/analytical-platform"
Expand Down

0 comments on commit 01ef417

Please sign in to comment.