-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the GATK base image to a newer LTS ubuntu release #8610
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d8fe231
Update the GATK base image to a newer LTS ubuntu release
droazen 50cfd0b
Incorporate base image changes from Sam Lee's PR, fix md5 check, othe…
droazen 4a4b5c6
pip
droazen 59762d5
Back out update to newer conda, try 20.04 instead of 22.04
droazen 87d6706
Back to 22.04
droazen ccaea7c
Add an h5diff epsilon + reporting of differences to ScoreVariantAnnot…
droazen 2187cf2
Capture h5diff output in exception messages
droazen 5576927
Remove epsilon temporarily
droazen 636d139
restore epsilon, add debugging statement
droazen 5934691
Remove debugging, remove obsolete runSystemCommand() method, final re…
droazen 82e8bfb
Incorporate Sam L patch to upgrade conda + pip
droazen 312141b
One more test with epsilon off to make sure reporting is still working
droazen 92ce8ac
Restore epsilon, switch to release base image, update scripts and docs
droazen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
# How to update the GATK base docker image: | ||
|
||
1. choose a new version number for the base image and manually update the version in `scripts/docker/gatkbase/build_docker_base.sh` | ||
2. build the gatkbase image using that script and upload it to the [gatk-dev docker repo](https://hub.docker.com/r/broadinstitute/gatk-dev/) or [gcr-gatk-snapshots](us.gcr.io/broad-dsde-methods/broad-gatk-snapshots) | ||
* cd to scripts/docker/gatkbase | ||
* run `./build_docker_base.sh` | ||
* `docker tag broadinstitute/gatk-dev:your-version-rc1` or whatever the correct tag is for where you want it uploaded | ||
* `docker push tagname` | ||
3. update the Dockerfile in the main gatk to use the image you pushed | ||
4. commit the changes to the two docker files and to a new pull request | ||
5. wait for the tests to pass and show it to a reviewer | ||
6. push the base image to the official [gatk repo](https://hub.docker.com/r/broadinstitute/gatk) with the right name | ||
7. update the main docker to point to the official version you just released | ||
8. wait for tests to pass in travis and merge | ||
1. In a branch, make whatever updates you need to the base image Dockerfile in `scripts/docker/gatkbase` | ||
2. Choose a new version number for the new base image | ||
3. Build the GATK base image by running either `build_docker_base_cloud.sh` (to build in the cloud using Google Cloud Build) or `build_docker_base_locally.sh` (to build on your local machine) from within the `scripts/docker/gatkbase` directory in your GATK clone. | ||
* Both scripts take the version of the new image as their only argument. Eg., `build_docker_base_cloud.sh 3.0.0rc1` will create the remote image `us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area:gatkbase-3.0.0rc1` | ||
4. If you built the image locally, you'll need to manually push it to the staging area at `us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area` | ||
5. Test the new image using the GATK branch with your changes to the base image Dockerfile, by modifying the FROM clause at the top of the main GATK Dockerfile to point to the base image you staged, and submit a PR for the branch to let the test suite run. | ||
6. Once tests pass and everything looks good, push the new base image to the release repositories using the `release_prebuilt_base_image.sh` script | ||
* The release script takes as arguments the prebuilt image you've tested, and a final version number for release. For example: `release_prebuilt_base_image.sh us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area:gatkbase-3.0.0rc1 3.0.0` | ||
* The release script looks for the image locally first, and if not found locally it pulls it from the remote repository before releasing. | ||
7. Update the FROM clause in the main GATK Dockerfile in your GATK PR to point to the officially-released image, and merge it once tests pass. | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
#!/bin/bash | ||
# | ||
# A script that builds the GATK base image using Google Cloud Build, and pushes it to | ||
# a staging location at us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area | ||
# | ||
# Usage: build_docker_base_cloud.sh <docker_image_version> | ||
# | ||
# After staging the image, you should test it with GATK before actually releasing it | ||
# using the release_prebuilt_base_image.sh script. You can test it by modifying the | ||
# main GATK Dockerfile FROM clause to point temporarily at the staged base image, and | ||
# submitting that as a PR to trigger a test suite run. | ||
# | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "Usage: $0 <docker_image_version>" | ||
exit 1 | ||
fi | ||
|
||
IMAGE_VERSION=$1 | ||
IMAGE_NAME="us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area" | ||
DOCKER_IMAGE_TAG="${IMAGE_NAME}:gatkbase-${IMAGE_VERSION}" | ||
|
||
gcloud builds submit --tag ${DOCKER_IMAGE_TAG} --timeout=24h --machine-type n1_highcpu_32 | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "gcloud builds submit failed" | ||
exit 1 | ||
fi | ||
|
||
echo "Successfully published image to staging area at ${DOCKER_IMAGE_TAG}" | ||
exit 0 |
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,33 @@ | ||
#!/bin/bash | ||
# | ||
# A script that builds the GATK base image locally (but does not push it anywhere). | ||
# | ||
# Usage: build_docker_base_locally.sh <docker_image_version> | ||
# | ||
# After building the image, you should test it with GATK before actually releasing it | ||
# using the release_prebuilt_base_image.sh script. You can test it by modifying the | ||
# main GATK Dockerfile FROM clause to point temporarily at the candidate base image, and | ||
# submitting that as a PR to trigger a test suite run. | ||
# | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "Usage: $0 <docker_image_version>" | ||
exit 1 | ||
fi | ||
|
||
IMAGE_VERSION=$1 | ||
IMAGE_REPO="us.gcr.io/broad-dsde-methods/gatk-base-image-staging-area" | ||
IMAGE_FULL_TAG="${IMAGE_REPO}:gatkbase-${IMAGE_VERSION}" | ||
|
||
# Build | ||
echo "Building image to tag ${IMAGE_FULL_TAG}..." | ||
docker build --squash -t "${IMAGE_FULL_TAG}" . | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "docker build failed" | ||
exit 1 | ||
fi | ||
|
||
echo "docker build succeeded" | ||
exit 0 | ||
|
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,60 @@ | ||
#!/bin/bash | ||
# | ||
# A script that takes a prebuilt GATK base image, and pushes it to the GATK release repositories on | ||
# dockerhub and GCR. Use the build_docker_base_cloud.sh or build_docker_base_locally.sh scripts to | ||
# build the image before running this script. | ||
# | ||
# Usage: release_prebuilt_base_image.sh <prebuilt_image> <version_number_for_release> | ||
# | ||
# If the prebuilt image exists locally, this script will push the local version. Otherwise, | ||
# it will pull the image from the remote repository before pushing it to the GATK release | ||
# repositories. | ||
# | ||
# prebuilt_image: The pre-built image you want to release (make sure you've tested it!) | ||
# May be either local or remote | ||
# version_tag_for_release: The version of the GATK base image you're releasing (eg., 3.1.0) | ||
# | ||
|
||
if [ $# -ne 2 ]; then | ||
echo "Usage: $0 <prebuilt_image> <version_tag_for_release>" | ||
exit 1 | ||
fi | ||
|
||
PREBUILT_IMAGE="$1" | ||
VERSION="$2" | ||
DOCKERHUB_REPO="broadinstitute/gatk" | ||
GCR_REPO="us.gcr.io/broad-gatk/gatk" | ||
BASE_IMAGE_FULL_TAG="gatkbase-${VERSION}" | ||
|
||
function fatal_error() { | ||
echo "$1" 1>&2 | ||
exit 1 | ||
} | ||
|
||
function docker_push() { | ||
echo "Pushing to ${1}" | ||
docker push "${1}" | ||
if [ $? -ne 0 ]; then | ||
fatal_error "Failed to push to ${1}" | ||
fi | ||
} | ||
|
||
# Test if the prebuilt image exists locally, and pull it if it doesn't | ||
docker image inspect "${PREBUILT_IMAGE}" > /dev/null 2>&1 | ||
if [ $? -ne 0 ]; then | ||
echo "Image ${PREBUILT_IMAGE} not found locally: attempting to pull it now" | ||
docker pull "${PREBUILT_IMAGE}" | ||
if [ $? -ne 0 ]; then | ||
fatal_error "Failed to pull pre-built image ${PREBUILT_IMAGE}" | ||
fi | ||
else | ||
echo "Image ${PREBUILT_IMAGE} found locally: pushing it to the release repositories" | ||
fi | ||
|
||
docker tag "${PREBUILT_IMAGE}" "${DOCKERHUB_REPO}:${BASE_IMAGE_FULL_TAG}" | ||
docker tag "${PREBUILT_IMAGE}" "${GCR_REPO}:${BASE_IMAGE_FULL_TAG}" | ||
|
||
docker_push "${DOCKERHUB_REPO}:${BASE_IMAGE_FULL_TAG}" | ||
docker_push "${GCR_REPO}:${BASE_IMAGE_FULL_TAG}" | ||
|
||
exit 0 |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this system pip required for anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it might be useful to have a pip in the base environment, but I can remove it if you think it might cause problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine, just curious!