Changes to reduce size of built docker images; replace miniconda with micromamba #29
+189
−68
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.
Docker builds of viral-baseimage have been creeping up in size. Inspection of the images via dive revealed that much of the space was being consumed by google-cloud-sdk and redundant installs of python.
This PR includes a number of changes to reduce the size of docker images build from this repo.
This installs google-cloud-sdk from google's distribution tarball rather than the apt package for it, in order to save some space (the former is smaller). It also removes the BigQuery component which is installed by default with google-cloud-sdk (it can be restored later if needed), and manually removes the redundant install of python3 that comes bundled with google-cloud-sdk since we already have the system python in
/bin
.This also replaces miniconda (+
mamba
) withmicromamba
as the manager for conda packages. Note: this means we do not have an install of python3 in the base conda environment (further reducing the size of this baseimage). Downstream python usage relying on this image will require an explicit conda python install in either this image or in downstream images built on top of this one (viral-core). This also also adds symlinks to micromamba from "conda" and "mamba", allowing most commands to make use of micromamba transparently, though there are some breaking differences in API (ex. "conda config --add" vs "micromamba config append").Altogether these changes shave ~800MB, or 45%, off the size of the docker image.
Closes #31