From b15270081fc2b70d7b8c985ffe3ba3df8550886c Mon Sep 17 00:00:00 2001 From: Jaeyoung Chun Date: Tue, 13 Jul 2021 08:38:39 -0400 Subject: [PATCH] Add Cromwell version --- Dockerfile.cromwell | 22 ++++++++++++++++++++++ package-for-cromwell.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 Dockerfile.cromwell create mode 100755 package-for-cromwell.sh diff --git a/Dockerfile.cromwell b/Dockerfile.cromwell new file mode 100644 index 0000000..d96a923 --- /dev/null +++ b/Dockerfile.cromwell @@ -0,0 +1,22 @@ +FROM centos:7 + +LABEL maintainer="Jaeyoung Chun (chunj@mskcc.org)" + +ENV CELLRANGER_ARC_VERSION 1.0.1 + +ENV PATH /opt/cellranger-arc-${CELLRANGER_ARC_VERSION}:$PATH + +RUN yum update -y && yum groups install "Development Tools" -y \ + && yum install -y which + +# https://support.10xgenomics.com/single-cell-multiome-atac-gex/software/downloads/1.0 +# cell ranger arc binaries +RUN curl -o cellranger-arc-1.0.1.tar.gz "https://cf.10xgenomics.com/releases/cell-arc/cellranger-arc-1.0.1.tar.gz?Expires=1626187084&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZi4xMHhnZW5vbWljcy5jb20vcmVsZWFzZXMvY2VsbC1hcmMvY2VsbHJhbmdlci1hcmMtMS4wLjEudGFyLmd6IiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjI2MTg3MDg0fX19XX0_&Signature=OtILJaLKQ5dF3bbB9Scwpspv3yB0yUxpofMwnOqi1IJjXBa8WU56TXJhdhZSLY2sR0bx7~Oc4~6R2wBG0lvrmCho322-OOPQkzfFYcvUtrOMcN8TLt3IKTD868h6CySrf4BSBFvCL~-66Fb0ztMB3Z5EuwGcRBDRzvnxQH8aM8oh7GjyLll~AfeJMISwWUEWfoHMcXBQASSkWP4qp609zzmirecDKEtjuvZYp5HbJvOFObEDqi9Cabpz8A5VEenop0aEuv~OOCb3qk4bh1hqaN4nx6kfcZLHav83aJm4JVo3C39SAU-cl9YGn4ow-T8vW7wfiaAbX3swBk5QB~Qjaw__&Key-Pair-Id=APKAI7S6A5RYOXBWRPDA" \ + && tar xzf cellranger-arc-${CELLRANGER_ARC_VERSION}.tar.gz \ + && rm -rf cellranger-arc-${CELLRANGER_ARC_VERSION}.tar.gz \ + && mv cellranger-arc-${CELLRANGER_ARC_VERSION} /opt/ + +WORKDIR /opt + +# ENTRYPOINT [ "cellranger-arc" ] +# CMD [ "--help"] diff --git a/package-for-cromwell.sh b/package-for-cromwell.sh new file mode 100755 index 0000000..2902862 --- /dev/null +++ b/package-for-cromwell.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +source config.sh + +image_name="cromwell-${image_name}" + +echo "Building ${image_name}:${version}..." + +# hack: comment the ENTRYPOINT and CMD lines +# https://github.com/broadinstitute/cromwell/issues/2461 +cat Dockerfile \ + | sed 's/^ENTRYPOINT \[/# ENTRYPOINT \[/g' \ + | sed 's/^CMD \[/# CMD \[/g' > Dockerfile.cromwell + +cat Dockerfile.cromwell + +# build it +docker build -t ${image_name}:${version} -f Dockerfile.cromwell . + +echo "Packaging ${registry}/${image_name}:${version}..." + +# +# tag it and push it to docker hub +# + +docker tag ${image_name}:${version} ${registry}/${image_name}:${version} +if [ $create_ecr_repo == 1 ] +then + # only create if not exist + aws ecr describe-repositories --repository-name ${image_name} 2> /dev/null + if [ $? != 0 ] + then + aws ecr create-repository --repository-name ${image_name} + fi +fi +docker push ${registry}/${image_name}:${version}