Skip to content
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

GATK Reduced Docker Layers for ACR #8808

Merged
merged 5 commits into from
May 9, 2024
Merged

Conversation

kevinpalis
Copy link
Contributor

As part of my work in the Pipeline Dev team, I created 2 GATK images to address issue discussed here (ie. having too many docker layers, we hit ACR limits very quickly). The images are in terrapublic, a premium-tier ACR and is publicly accessible. I made two images, one is squashed to just 1 layer, the other is reduced to just 12 layers (from the original 45). With these changes and the fact that terrapublic is on premium tier, the maximum docker pulls per minute becomes 833 (ie. 10k readOps / 12 layers) for the reduced-layers image and 10,000 for the squashed one. We have yet to test these in our pipelines but I anticipate the squashed version to be slower since it won’t be able to take advantage of any parallel pulls or caching, hence the two versions to allow pipeline devs to decide which one is better for their use-case.

@droazen droazen self-requested a review May 3, 2024 15:41
@droazen droazen self-assigned this May 3, 2024
Copy link
Contributor

@droazen droazen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kevinpalis Back to you with my comments

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
@kevinpalis kevinpalis requested a review from droazen May 7, 2024 16:37
Copy link
Contributor Author

@kevinpalis kevinpalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes done. Tested locally too.

Copy link
Contributor

@droazen droazen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new changes to the base image Dockerfile look good to me, @kevinpalis ! Can you tell us how many layers we have total after these changes? Is there any value in pursuing a full squash, or do you think that with this patch most users' issues will be resolved?

@kevinpalis
Copy link
Contributor Author

The new changes to the base image Dockerfile look good to me, @kevinpalis ! Can you tell us how many layers we have total after these changes? Is there any value in pursuing a full squash, or do you think that with this patch most users' issues will be resolved?

@droazen , the total layers is now down to 16 (from 44). I honestly don't see the value of doing a full squash, mainly because if we are hosting this in a premium ACR, the limit is 10,000 readOps per minute. So with 16 layers, you get around 625 pulls per minute. Also, this will be able to still take advantage of parallel pulls (default is 3, but at most 16 threads in this case, I believe) as opposed to one big layer which will not download in parallel. There's the potential of that being a lot slower and subsequent jobs falling into the same "minute" because others are not done, making it easier to hit that 10k readOps limit. Lastly, people using GATK outside data pipelines will not be able to take advantage of layer caching too.

@droazen droazen merged commit c6daf7d into master May 9, 2024
17 checks passed
@droazen droazen deleted the kp_reduced_docker_layers branch May 9, 2024 18:48
@MattMcL4475
Copy link

Thanks @droazen ! what are the full image names for the two new images in terrapublic ?

@kevinpalis
Copy link
Contributor Author

Hi @MattMcL4475 - if you mean the images I used to test these, they are: terrapublic.azurecr.io/gatk:4.5-squashed and terrapublic.azurecr.io/gatk:4.5-min-layers

Note that these are manually built and pushed for this task and didn't go through any automated tests that are in this repo.

@MattMcL4475
Copy link

Thanks @kevinpalis - is there a special tag to get the squashed version of the official GATK image broadinstitute/gatk ?

@kevinpalis
Copy link
Contributor Author

Hi @MattMcL4475 - so sorry I didn't see your reply until now (likely due to my email filters). Anyway, I don't think we have a squashed version of this in the official GATK image. From the conversation above, I think we decided to go with just the reduced layers version of the image which is what this PR is for. I do, however, have a sample squashed version here: terrapublic.azurecr.io/gatk:4.5-squashed - but then again, it's not in the official Docker hub repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants