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

Show estimated images uncompressed size #189

Merged
merged 7 commits into from
Oct 22, 2023
Merged

Conversation

ShutdownRepo
Copy link
Member

Previously, the wrapper would show remote image compressed size when they were not installed.
This is because the real, uncompressed, size cannot be fetched through Dockerhub and because the compression factor is not publick knowledge.

I downloaded a few images and did the math

Image Version Arch compressed (GB) uncompressed (GB) comp. rate
nightly 15b188c0 arm64 14.3 34.7 2.42
web 3.1.1 arm64 6.5 15.1 2.32
osint 3.1.1 arm64 3.2 8.2 2.56
light 3.1.1 arm64 4.6 11.9 2.58
full 3.1.1 arm64 13.9 33.9 2.43

The comp. factor goes up to x2.6.
Taking this into account, I modified the wrapper to show that estimated size instead as it makes more sense for the end user to know how much room it'll take on disk. This replaces the "compressed download" size on the images list available through (for instance) exegol info.

Image

When increasing verbosity, both "compressed download" size and "real size on disk" are shown

Image

@ShutdownRepo ShutdownRepo added the enhancement New feature or request label Oct 17, 2023
@ShutdownRepo ShutdownRepo self-assigned this Oct 17, 2023
@ShutdownRepo
Copy link
Member Author

Adding a message to the use when starting an image download

image

@QU35T-code @Dramelac any idea to why the download size (left arrow in the screenshot above) is not the same as the one shown during the download process (right arrow in the screenshot above) ?

@Dramelac
Copy link
Member

any idea to why the download size (left arrow in the screenshot above) is not the same as the one shown during the download process (right arrow in the screenshot above) ?

No i don't know, but i wouldn't be surprise if docker mess things up somewhere, like not including metadata in the size count or something like this

exegol/utils/DockerUtils.py Outdated Show resolved Hide resolved
Copy link
Member

@Dramelac Dramelac left a comment

Choose a reason for hiding this comment

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

Last update and it should be good to go

exegol/model/ExegolImage.py Outdated Show resolved Hide resolved
@Dramelac Dramelac merged commit 944e5ec into dev Oct 22, 2023
14 checks passed
@Dramelac Dramelac deleted the estimated_remote_size branch October 22, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants