-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
101 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
scripts/variantstore/wdl/extract/plink_docker/build_plink_docker.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
set -o errexit -o nounset -o pipefail | ||
|
||
usage() { | ||
echo " | ||
USAGE: ./build_plink_docker.sh | ||
Build a PLINK 2 (https://www.cog-genomics.org/plink/2.0/) Docker image with an appropriate tag and push to GAR. | ||
The repo name will be 'us-central1-docker.pkg.dev/broad-dsde-methods/gvs' and the image name will be 'plink2'. | ||
Tags will be of the form <ISO 8601 Date>-slim-<Docker image ID>. | ||
e.g. 2024-04-22-slim-f000ba44 | ||
" | ||
exit 1 | ||
} | ||
|
||
if [[ $# -ne 0 ]] | ||
then | ||
usage | ||
fi | ||
|
||
docker build . --iidfile idfile.txt | ||
|
||
FULL_IMAGE_ID=$(cat idfile.txt) | ||
IMAGE_ID=${FULL_IMAGE_ID:7:12} | ||
IMAGE_TYPE="slim" | ||
TAG=$(python3 ../build_docker_tag.py --image-id "${IMAGE_ID}" --image-type "${IMAGE_TYPE}") | ||
|
||
BASE_REPO="broad-dsde-methods/gvs" | ||
REPO_WITH_TAG="${BASE_REPO}/plink2:${TAG}" | ||
docker tag "${IMAGE_ID}" "${REPO_WITH_TAG}" | ||
|
||
|
||
GAR_TAG="us-central1-docker.pkg.dev/${REPO_WITH_TAG}" | ||
docker tag "${REPO_WITH_TAG}" "${GAR_TAG}" | ||
|
||
# Docker must be configured for GAR before pushes will work: | ||
# gcloud auth configure-docker us-central1-docker.pkg.dev | ||
docker push "${GAR_TAG}" | ||
|
||
echo "Docker image pushed to \"${GAR_TAG}\"" | ||
|
||
rm idfile.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters