Skip to content

Commit

Permalink
CodeBuild doesn't support git-lfs
Browse files Browse the repository at this point in the history
Download files from GitHub instead
  • Loading branch information
alexiswl committed Nov 3, 2024
1 parent 6da7013 commit 71ad8ba
Showing 1 changed file with 47 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 71ad8ba

Please sign in to comment.