From 027a2a9a86ae6f97edd2de01b9366cee33a8e915 Mon Sep 17 00:00:00 2001 From: David Roazen Date: Sat, 9 Dec 2023 13:00:44 -0500 Subject: [PATCH] Incorporate base image changes from Sam Lee's PR, fix md5 check, other changes --- Dockerfile | 2 +- scripts/docker/gatkbase/Dockerfile | 53 ++++++++++-------------------- 2 files changed, 18 insertions(+), 37 deletions(-) diff --git a/Dockerfile b/Dockerfile index 253dd82c33d..ac85604ad00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_DOCKER=us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area:3.2.0rc3 +ARG BASE_DOCKER=us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area:3.2.0rc4 # stage 1 for constructing the GATK zip FROM ${BASE_DOCKER} AS gradleBuild diff --git a/scripts/docker/gatkbase/Dockerfile b/scripts/docker/gatkbase/Dockerfile index da062cdc173..88fd2a36837 100644 --- a/scripts/docker/gatkbase/Dockerfile +++ b/scripts/docker/gatkbase/Dockerfile @@ -3,11 +3,10 @@ FROM ubuntu:22.04 #### Basic image utilities -RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y --no-install-recommends \ +RUN apt update && \ + apt full-upgrade -y && \ + apt install -y --no-install-recommends \ python3 \ - python3-pip \ wget \ curl \ bc \ @@ -21,12 +20,13 @@ RUN apt-get update && \ git \ gpg-agent \ build-essential \ + libblas-dev \ openjdk-17-jdk \ vim \ software-properties-common && \ - apt-get -y clean && \ - apt-get -y autoclean && \ - apt-get -y autoremove && \ + apt -y clean && \ + apt -y autoclean && \ + apt -y autoremove && \ rm -rf /var/lib/apt/lists/* RUN java -version @@ -35,11 +35,11 @@ RUN java -version RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" \ | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \ | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \ - apt-get update -y && \ - apt-get install -y --no-install-recommends google-cloud-cli && \ - apt-get -y clean && \ - apt-get -y autoclean && \ - apt-get -y autoremove && \ + apt update -y && \ + apt install -y --no-install-recommends google-cloud-cli && \ + apt -y clean && \ + apt -y autoclean && \ + apt -y autoremove && \ rm -rf /var/lib/apt/lists/* && \ # Remove the anthos cli tool and related files since they are very large and we / anyone using the docker are unlikely to use them # Remove the bundled python because we have python installed separately @@ -59,35 +59,16 @@ ENV JAVA_LIBRARY_PATH /usr/lib/jni # Install miniconda ENV DOWNLOAD_DIR /downloads -ENV CONDA_URL https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Linux-x86_64.sh -ENV CONDA_MD5 = "32d73e1bc33fda089d7cd9ef4c1be542616bd8e437d1f77afeeaf7afdb019787" +ENV CONDA_URL https://repo.anaconda.com/miniconda/Miniconda3-py310_23.10.0-1-Linux-x86_64.sh +ENV CONDA_SHA256 "c7a34df472feb69805b64df6e8db58363c5ccab41cd3b40b07e3e6dfb924359a" ENV CONDA_PATH /opt/miniconda ENV PATH $CONDA_PATH/bin:$PATH RUN mkdir $DOWNLOAD_DIR && \ wget -nv -O $DOWNLOAD_DIR/miniconda.sh $CONDA_URL && \ - test "`md5sum $DOWNLOAD_DIR/miniconda.sh | awk -v FS=' ' '{print $1}'` = $CONDA_MD5" && \ + test "$(sha256sum $DOWNLOAD_DIR/miniconda.sh | awk -v FS=' ' -v ORS='' '{print $1}')" = "$CONDA_SHA256" && \ bash $DOWNLOAD_DIR/miniconda.sh -p $CONDA_PATH -b && \ rm $DOWNLOAD_DIR/miniconda.sh && \ + conda config --set auto_update_conda false && \ + conda config --set solver libmamba && \ conda clean -afy && \ - find /opt/miniconda/ -follow -type f -name '*.a' -delete && \ - find /opt/miniconda/ -follow -type f -name '*.pyc' -delete && \ rm -rf /root/.cache/pip - -# Install miniconda -# Following the instructions from https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html -# Note that this *does* install just miniconda, despite the package being named "conda" -# RUN curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > /tmp/conda.gpg && \ -# install -o root -g root -m 644 /tmp/conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \ -# gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \ -# rm /tmp/conda.gpg && \ -# echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list && \ -# apt update && \ -# apt install conda && \ -# apt -y clean && \ -# apt -y autoclean && \ -# apt -y autoremove && \ -# . /opt/conda/etc/profile.d/conda.sh && \ -# conda -V -# -# ENV CONDA_PATH /opt/conda -# ENV PATH $CONDA_PATH/bin:$PATH