From 51def1870a55ba2f5c3bec855684bf835da9628e Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets Date: Wed, 27 Sep 2023 13:58:45 -0700 Subject: [PATCH] Update docker files: use heredocs syntax Update downloaders image aspera path. --- api/dockerfiles/Dockerfile.api | 12 +- api/dockerfiles/Dockerfile.api_base | 25 +++-- api/dockerfiles/Dockerfile.api_local | 2 + common/dockerfiles/Dockerfile.base | 103 ++++++++--------- foreman/dockerfiles/Dockerfile.foreman | 16 +-- workers/dockerfiles/Dockerfile.affymetrix | 3 +- workers/dockerfiles/Dockerfile.compendia | 110 +++++++++---------- workers/dockerfiles/Dockerfile.downloaders | 26 +++-- workers/dockerfiles/Dockerfile.illumina | 3 +- workers/dockerfiles/Dockerfile.no_op | 13 ++- workers/dockerfiles/Dockerfile.salmon | 42 ++++--- workers/dockerfiles/Dockerfile.smasher | 3 +- workers/dockerfiles/Dockerfile.transcriptome | 29 +++-- 13 files changed, 197 insertions(+), 190 deletions(-) diff --git a/api/dockerfiles/Dockerfile.api b/api/dockerfiles/Dockerfile.api index bbdf1af3e..292d1149a 100644 --- a/api/dockerfiles/Dockerfile.api +++ b/api/dockerfiles/Dockerfile.api @@ -5,10 +5,14 @@ FROM $DOCKERHUB_REPO/dr_api_base:$SYSTEM_VERSION # Fail in case of an error at any stage in the pipe. SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN pip install --ignore-installed --no-cache-dir uwsgi && \ - chmod +x /home/user/collect_and_run_uwsgi.sh && \ - mkdir -p /tmp/www/static && \ - chown user /tmp/www/static +RUN <> ~/.gnupg/dirmngr.conf && \ - gpg --keyserver keyserver.ubuntu.com --recv-keys \ - 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \ - curl -sSL https://get.rvm.io | bash -s stable --ruby --gems=aspera-cli +RUN <> ~.gnupg/dirmngr.conf +. /home/user/rvm/scripts/rvm +ascli conf ascp install +EOF + USER root # Get the latest version from the dist directory. COPY common/dist/data-refinery-common-* common/ -RUN pip3 install --ignore-installed --no-cache-dir \ - common/$(ls common -1 | sort --version-sort | tail -1) +RUN pip3 install --ignore-installed --no-cache-dir common/$(ls common -1 | sort --version-sort | tail -1) COPY .boto .boto COPY workers/ . RUN rm -rf /root/.cache/* -ENV PATH="$PATH:/home/user/.aspera/ascli/sdk" +ENV PATH="$PATH:/home/user/.aspera/sdk" ENV SYSTEM_VERSION=$SYSTEM_VERSION USER user diff --git a/workers/dockerfiles/Dockerfile.illumina b/workers/dockerfiles/Dockerfile.illumina index 5748788d9..54ac5539a 100644 --- a/workers/dockerfiles/Dockerfile.illumina +++ b/workers/dockerfiles/Dockerfile.illumina @@ -16,8 +16,7 @@ RUN pip3 install --ignore-installed --no-cache-dir -r requirements.txt # Get the latest version from the dist directory. COPY common/dist/data-refinery-common-* common/ -RUN pip3 install --ignore-installed --no-cache-dir \ - common/$(ls common -1 | sort --version-sort | tail -1) +RUN pip3 install --ignore-installed --no-cache-dir common/$(ls common -1 | sort --version-sort | tail -1) COPY .boto .boto COPY workers/ . diff --git a/workers/dockerfiles/Dockerfile.no_op b/workers/dockerfiles/Dockerfile.no_op index a9ffe09dd..67cf380be 100644 --- a/workers/dockerfiles/Dockerfile.no_op +++ b/workers/dockerfiles/Dockerfile.no_op @@ -18,18 +18,19 @@ RUN pip3 install --ignore-installed --no-cache-dir -r requirements.txt RUN mkdir -p gene_indexes WORKDIR /home/user/gene_indexes ENV ID_REFINERY_URL=https://zenodo.org/record/1410647/files/all_1536267482.zip -RUN curl -O $ID_REFINERY_URL && \ - echo $ID_REFINERY_URL > /etc/identifier_refinery_url && \ - unzip *.zip && \ - rm *.zip +RUN < /etc/identifier_refinery_url +unzip *.zip +rm *.zip +EOF # End Noop-specific. WORKDIR /home/user # Get the latest version from the dist directory. COPY common/dist/data-refinery-common-* common/ -RUN pip3 install --ignore-installed --no-cache-dir \ - common/$(ls common -1 | sort --version-sort | tail -1) +RUN pip3 install --ignore-installed --no-cache-dir common/$(ls common -1 | sort --version-sort | tail -1) COPY .boto .boto COPY workers/ . diff --git a/workers/dockerfiles/Dockerfile.salmon b/workers/dockerfiles/Dockerfile.salmon index ec2f49971..4a103f8b2 100644 --- a/workers/dockerfiles/Dockerfile.salmon +++ b/workers/dockerfiles/Dockerfile.salmon @@ -24,36 +24,34 @@ ENV SALMON_VERSION=0.13.1 # On version 0.13.1 salmon was being extracted to a folder with an all # lowercase name the options `-C` and `--strip-components` allow us to specify #the name for the resulting file. -RUN wget -q "https://github.com/COMBINE-lab/salmon/releases/download/\ -v${SALMON_VERSION}/Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz" && \ - mkdir "Salmon-${SALMON_VERSION}_linux_x86_64" && \ - tar -xzf "Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz" \ - -C "Salmon-${SALMON_VERSION}_linux_x86_64" --strip-components 1 && \ - ln -sf "$(pwd)/Salmon-${SALMON_VERSION}_linux_x86_64/bin/salmon" \ - /usr/local/bin/ && \ - rm "Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz" +RUN <