Reduce uncompressed image size (reported by docker images) by ~30%.
Our AWS batch use case required adjustments to the image, and I started to run out of disk space while tinkering locally. These are some very conservative changes that reduce uncompressed image size by 30%. (will try to verify once I deal with the disk space issue, unless someone else gets there first)
There are some further refactorings I can propose once we've gotten the base infra finalized on our side, but this is a quick tweak to get started.
Proposed changes
This repo disables forks and pull requests, so I've inlined the modified dockerfile as text in an issue ticket. There is always a way. 🐙
Explanation
All temporary files (cache and gz files) are now downloaded and deleted in the same docker instruction. Apt and conda cache size can be significant, and this prevents temp files from being saved as layers.
Purpose
Reduce uncompressed image size (reported by
docker images
) by ~30%.Our AWS batch use case required adjustments to the image, and I started to run out of disk space while tinkering locally. These are some very conservative changes that reduce uncompressed image size by 30%. (will try to verify once I deal with the disk space issue, unless someone else gets there first)
There are some further refactorings I can propose once we've gotten the base infra finalized on our side, but this is a quick tweak to get started.
Proposed changes
This repo disables forks and pull requests, so I've inlined the modified dockerfile as text in an issue ticket. There is always a way. 🐙
Explanation
All temporary files (cache and gz files) are now downloaded and deleted in the same docker instruction. Apt and conda cache size can be significant, and this prevents temp files from being saved as layers.
Code