From 71ad8badc3d0e72efc884e5b03d18a6ee5476685 Mon Sep 17 00:00:00 2001 From: Alexis Lucattini Date: Sun, 3 Nov 2024 17:04:29 +1100 Subject: [PATCH] CodeBuild doesn't support git-lfs Download files from GitHub instead --- .../tasks/ora_decompression/Dockerfile | 85 ++++++++++--------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/lib/workload/components/ora-file-decompression-fq-pair-sfn/tasks/ora_decompression/Dockerfile b/lib/workload/components/ora-file-decompression-fq-pair-sfn/tasks/ora_decompression/Dockerfile index bc31b827d..6446fc105 100644 --- a/lib/workload/components/ora-file-decompression-fq-pair-sfn/tasks/ora_decompression/Dockerfile +++ b/lib/workload/components/ora-file-decompression-fq-pair-sfn/tasks/ora_decompression/Dockerfile @@ -1,34 +1,35 @@ FROM --platform=${TARGETPLATFORM} ubuntu:noble ARG ORAD_REF_DOWNLOAD_URL="https://s3.amazonaws.com/webdata.illumina.com/downloads/software/dragen-decompression/orad.2.7.0.linux.tar.gz" +ARG ORAD_AARCH_64_DOWNLOAD_URL="https://media.githubusercontent.com/media/umccr/orcabus/refs/heads/main/lib/workload/components/ora-file-decompression-fq-pair-sfn/tasks/ora_decompression/binaries/orad.tar.gz" ARG ORA_MOUNT="/opt" ARG TARGETPLATFORM # Install ubuntu basics RUN \ - if [ "${TARGETPLATFORM#linux/}" = "arm64" ]; then \ - platform_url="aarch64"; \ - else \ - platform_url="x86_64"; \ - fi && \ - apt update -yq && \ - apt upgrade -yq && \ - apt install -yq \ - wget \ - jq \ - tar \ - gzip \ - unzip \ - python3.12 \ - python3-pip && \ - python3 -mpip install wrapica --break-system-packages && \ - wget \ - --quiet \ - --output-document "awscliv2.zip" \ - "https://awscli.amazonaws.com/awscli-exe-linux-${platform_url}.zip" && \ - unzip -q "awscliv2.zip" && \ - ./aws/install && \ - rm "awscliv2.zip" + if [ "${TARGETPLATFORM#linux/}" = "arm64" ]; then \ + platform_url="aarch64"; \ + else \ + platform_url="x86_64"; \ + fi && \ + apt update -yq && \ + apt upgrade -yq && \ + apt install -yq \ + wget \ + jq \ + tar \ + gzip \ + unzip \ + python3.12 \ + python3-pip && \ + python3 -mpip install wrapica --break-system-packages && \ + wget \ + --quiet \ + --output-document "awscliv2.zip" \ + "https://awscli.amazonaws.com/awscli-exe-linux-${platform_url}.zip" && \ + unzip -q "awscliv2.zip" && \ + ./aws/install && \ + rm "awscliv2.zip" ## Install qemu-virtualization ## Commented out as we now have an orad arm64 binary version @@ -56,27 +57,35 @@ RUN \ # Install the ora reference data directly into the docker container # Remove the orad x86-64 binary since we use the arm64 binary provided instead RUN \ - mkdir --parents --mode 744 "${ORA_MOUNT}" && \ - wget --quiet \ - --output-document /dev/stdout \ - "${ORAD_REF_DOWNLOAD_URL}" | \ - tar \ - --directory "${ORA_MOUNT}" \ - --extract \ - --gunzip \ - --strip-components=1 \ - --file - && \ - chmod 644 "${ORA_MOUNT}/oradata/" && \ - chmod a+x "${ORA_MOUNT}/orad" && \ - rm "${ORA_MOUNT}/orad" + mkdir --parents --mode 744 "${ORA_MOUNT}" && \ + wget --quiet \ + --output-document /dev/stdout \ + "${ORAD_REF_DOWNLOAD_URL}" | \ + tar \ + --directory "${ORA_MOUNT}" \ + --extract \ + --gunzip \ + --strip-components=1 \ + --file - && \ + chmod 644 "${ORA_MOUNT}/oradata/" && \ + chmod a+x "${ORA_MOUNT}/orad" && \ + rm "${ORA_MOUNT}/orad" # Set the ora reference to the path ORA_MOUNT/oradata ENV ORADATA_PATH="${ORA_MOUNT}/oradata/" # Add the orad binary to the docker container # And make it executable -ADD binaries/orad.tar.gz /usr/local/bin/ -RUN chmod +x /usr/local/bin/orad +RUN \ + wget \ + --output-document /dev/stdout \ + "${ORAD_AARCH_64_DOWNLOAD_URL}" | \ + tar \ + --directory /usr/local/bin \ + --extract \ + --gzip \ + --file - && \ + chmod +x /usr/local/bin/orad # Copy the scripts to the docker container # Make the scripts executable