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

chore: Remove google-cloud-sdk archive from python image #390

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clundin25
Copy link

Currently the tar archive for the google-cloud-sdk is not deleted after
it is unpacked. This bloats the resulting docker image with ~189 MB of
unused data.

(base) root@8eda5cb5bf03:/# ls -lh
total 272M
-rw-r--r--   1 root root  83M Nov 22  2023 Mambaforge.sh
lrwxrwxrwx   1 root root    7 Oct  3  2023 bin -> usr/bin
drwxr-xr-x   2 root root 4.0K Apr 15  2020 boot
drwxr-xr-x   5 root root  360 Jun 27 16:42 dev
drwxr-xr-x   1 root root 4.0K Jun 27 16:42 etc
drwxr-xr-x  15 root root 4.0K Jun 27 16:49 google-auth-library-python
drwxr-xr-x   1 root root 4.0K Nov 22  2023 google-cloud-sdk
-rw-r--r--   1 root root 189M Feb 28  2023 google-cloud-sdk-420.0.0-linux-x86_64.tar.gz

. . .

Removing the tar.gz file after unpacking it will slim the resulting
image by ~189 MB.

Currently the tar archive for the google-cloud-sdk is not deleted after
it is unpacked. This bloats the resulting docker image with ~189 MB of
unused data.

```
(base) root@8eda5cb5bf03:/# ls -lh
total 272M
-rw-r--r--   1 root root  83M Nov 22  2023 Mambaforge.sh
lrwxrwxrwx   1 root root    7 Oct  3  2023 bin -> usr/bin
drwxr-xr-x   2 root root 4.0K Apr 15  2020 boot
drwxr-xr-x   5 root root  360 Jun 27 16:42 dev
drwxr-xr-x   1 root root 4.0K Jun 27 16:42 etc
drwxr-xr-x  15 root root 4.0K Jun 27 16:49 google-auth-library-python
drwxr-xr-x   1 root root 4.0K Nov 22  2023 google-cloud-sdk
-rw-r--r--   1 root root 189M Feb 28  2023 google-cloud-sdk-420.0.0-linux-x86_64.tar.gz

. . .
```

Removing the tar.gz file after unpacking it will slim the resulting
image by ~189 MB.
@clundin25 clundin25 requested a review from a team as a code owner June 27, 2024 19:23
@parthea
Copy link
Contributor

parthea commented Jun 27, 2024

/gcbrun

Copy link
Contributor

@parthea parthea left a comment

Choose a reason for hiding this comment

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

Thanks @clundin25 !

@clundin25
Copy link
Author

@parthea it looks like Python 3.7 is no longer working with the get-pip.py script.

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.

2 participants