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

[SPARK-48029][INFRA] Update the packages name removed in building the spark docker image #46258

Closed

Conversation

panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Apr 28, 2024

What changes were proposed in this pull request?

The pr aims to update the packages name removed in building the spark docker image.

Why are the changes needed?

When our default image base was switched from ubuntu 20.04 to ubuntu 22.04, the unused installation package in the base image has changed, in order to eliminate some warnings in building images and free disk space more accurately, we need to correct it.

Before:

#35 [29/31] RUN apt-get remove --purge -y     '^aspnet.*' '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*'     snapd google-chrome-stable microsoft-edge-stable firefox     azure-cli google-cloud-sdk mono-devel powershell libgl1-mesa-dri || true
#35 0.489 Reading package lists...
#35 0.505 Building dependency tree...
#35 0.507 Reading state information...
#35 0.511 E: Unable to locate package ^aspnet.*
#35 0.511 E: Couldn't find any package by glob '^aspnet.*'
#35 0.511 E: Couldn't find any package by regex '^aspnet.*'
#35 0.511 E: Unable to locate package ^dotnet-.*
#35 0.511 E: Couldn't find any package by glob '^dotnet-.*'
#35 0.511 E: Couldn't find any package by regex '^dotnet-.*'
#35 0.511 E: Unable to locate package ^llvm-.*
#35 0.511 E: Couldn't find any package by glob '^llvm-.*'
#35 0.511 E: Couldn't find any package by regex '^llvm-.*'
#35 0.511 E: Unable to locate package ^mongodb-.*
#35 0.511 E: Couldn't find any package by glob '^mongodb-.*'
#35 0.511 EPackage 'php-crypt-gpg' is not installed, so not removed
#35 0.511 Package 'php' is not installed, so not removed
#35 0.511 : Couldn't find any package by regex '^mongodb-.*'
#35 0.511 E: Unable to locate package snapd
#35 0.511 E: Unable to locate package google-chrome-stable
#35 0.511 E: Unable to locate package microsoft-edge-stable
#35 0.511 E: Unable to locate package firefox
#35 0.511 E: Unable to locate package azure-cli
#35 0.511 E: Unable to locate package google-cloud-sdk
#35 0.511 E: Unable to locate package mono-devel
#35 0.511 E: Unable to locate package powershell
#35 DONE 0.5s

#36 [30/31] RUN apt-get autoremove --purge -y
#36 0.063 Reading package lists...
#36 0.079 Building dependency tree...
#36 0.082 Reading state information...
#36 0.088 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
#36 DONE 0.4s

After:

#38 [32/36] RUN apt-get remove --purge -y     'gfortran-11' 'humanity-icon-theme' 'nodejs-doc' || true
#38 0.066 Reading package lists...
#38 0.087 Building dependency tree...
#38 0.089 Reading state information...
#38 0.094 The following packages were automatically installed and are no longer required:
#38 0.094   at-spi2-core bzip2-doc dbus-user-session dconf-gsettings-backend
#38 0.095   dconf-service gsettings-desktop-schemas gtk-update-icon-cache
#38 0.095   hicolor-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data
#38 0.095   libatspi2.0-0 libbz2-dev libcairo-gobject2 libcolord2 libdconf1 libepoxy0
#38 0.095   libgfortran-11-dev libgtk-3-common libjs-highlight.js libllvm11
#38 0.095   libncurses-dev libncurses5-dev libphobos2-ldc-shared98 libreadline-dev
#38 0.095   librsvg2-2 librsvg2-common libvte-2.91-common libwayland-client0
#38 0.095   libwayland-cursor0 libwayland-egl1 libxdamage1 libxkbcommon0
#38 0.095   session-migration tilix-common xkb-data
#38 0.095 Use 'apt autoremove' to remove them.
#38 0.096 The following packages will be REMOVED:
#38 0.096   adwaita-icon-theme* gfortran* gfortran-11* humanity-icon-theme* libgtk-3-0*
#38 0.096   libgtk-3-bin* libgtkd-3-0* libvte-2.91-0* libvted-3-0* nodejs-doc*
#38 0.096   r-base-dev* tilix* ubuntu-mono*
#38 0.248 0 upgraded, 0 newly installed, 13 to remove and 0 not upgraded.
#38 0.248 After this operation, 99.6 MB disk space will be freed.
...
(Reading database ... 70597 files and directories currently installed.)
#38 0.304 Removing r-base-dev (4.1.2-1ubuntu2) ...
#38 0.319 Removing gfortran (4:11.2.0-1ubuntu1) ...
#38 0.340 Removing gfortran-11 (11.4.0-1ubuntu1~22.04) ...
#38 0.356 Removing tilix (1.9.4-2build1) ...
#38 0.377 Removing libvted-3-0:amd64 (3.10.0-1ubuntu1) ...
#38 0.392 Removing libvte-2.91-0:amd64 (0.68.0-1) ...
#38 0.407 Removing libgtk-3-bin (3.24.33-1ubuntu2) ...
#38 0.422 Removing libgtkd-3-0:amd64 (3.10.0-1ubuntu1) ...
#38 0.436 Removing nodejs-doc (12.22.9~dfsg-1ubuntu3.4) ...
#38 0.457 Removing libgtk-3-0:amd64 (3.24.33-1ubuntu2) ...
#38 0.488 Removing ubuntu-mono (20.10-0ubuntu2) ...
#38 0.754 Removing humanity-icon-theme (0.6.16) ...
#38 1.362 Removing adwaita-icon-theme (41.0-1ubuntu1) ...
#38 1.537 Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
#38 1.566 Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
#38 1.577 Processing triggers for libglib2.0-0:amd64 (2.72.4-0ubuntu2.2) ...
(Reading database ... 56946 files and directories currently installed.)
#38 1.645 Purging configuration files for libgtk-3-0:amd64 (3.24.33-1ubuntu2) ...
#38 1.657 Purging configuration files for ubuntu-mono (20.10-0ubuntu2) ...
#38 1.670 Purging configuration files for humanity-icon-theme (0.6.16) ...
#38 1.682 Purging configuration files for adwaita-icon-theme (41.0-1ubuntu1) ...
#38 DONE 1.7s

#39 [33/36] RUN apt-get autoremove --purge -y
#39 0.061 Reading package lists...
#39 0.075 Building dependency tree...
#39 0.077 Reading state information...
#39 0.083 The following packages will be REMOVED:
#39 0.083   at-spi2-core* bzip2-doc* dbus-user-session* dconf-gsettings-backend*
#39 0.083   dconf-service* gsettings-desktop-schemas* gtk-update-icon-cache*
#39 0.083   hicolor-icon-theme* libatk-bridge2.0-0* libatk1.0-0* libatk1.0-data*
#39 0.083   libatspi2.0-0* libbz2-dev* libcairo-gobject2* libcolord2* libdconf1*
#39 0.083   libepoxy0* libgfortran-11-dev* libgtk-3-common* libjs-highlight.js*
#39 0.083   libllvm11* libncurses-dev* libncurses5-dev* libphobos2-ldc-shared98*
#39 0.083   libreadline-dev* librsvg2-2* librsvg2-common* libvte-2.91-common*
#39 0.083   libwayland-client0* libwayland-cursor0* libwayland-egl1* libxdamage1*
#39 0.083   libxkbcommon0* session-migration* tilix-common* xkb-data*
#39 0.231 0 upgraded, 0 newly installed, 36 to remove and 0 not upgraded.
#39 0.231 After this operation, 124 MB disk space will be freed.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

  • Manually test.
  • Pass GA.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the BUILD label Apr 28, 2024
@panbingkun panbingkun changed the title [Only for check Docker Image] Check installed packages on ubuntu 22.04 [SPARK-48029][INFRA] Make more accurate to remove unused packages in spark docker image Apr 28, 2024
@panbingkun panbingkun changed the title [SPARK-48029][INFRA] Make more accurate to remove unused packages in spark docker image [SPARK-48029][INFRA] Update the packages name removed in building the spark docker image Apr 28, 2024
@panbingkun
Copy link
Contributor Author

cc @zhengruifeng

@panbingkun panbingkun marked this pull request as ready for review April 29, 2024 00:20
@dongjoon-hyun
Copy link
Member

Merged to master.

JacobZheng0927 pushed a commit to JacobZheng0927/spark that referenced this pull request May 11, 2024
… spark docker image

### What changes were proposed in this pull request?
The pr aims to update the packages name removed in building the spark docker image.

### Why are the changes needed?
When our default image base was switched from `ubuntu 20.04` to `ubuntu 22.04`, the unused installation package in the base image has changed, in order to eliminate some warnings in building images and free disk space more accurately, we need to correct it.

Before:
```
apache#35 [29/31] RUN apt-get remove --purge -y     '^aspnet.*' '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*'     snapd google-chrome-stable microsoft-edge-stable firefox     azure-cli google-cloud-sdk mono-devel powershell libgl1-mesa-dri || true
apache#35 0.489 Reading package lists...
apache#35 0.505 Building dependency tree...
apache#35 0.507 Reading state information...
apache#35 0.511 E: Unable to locate package ^aspnet.*
apache#35 0.511 E: Couldn't find any package by glob '^aspnet.*'
apache#35 0.511 E: Couldn't find any package by regex '^aspnet.*'
apache#35 0.511 E: Unable to locate package ^dotnet-.*
apache#35 0.511 E: Couldn't find any package by glob '^dotnet-.*'
apache#35 0.511 E: Couldn't find any package by regex '^dotnet-.*'
apache#35 0.511 E: Unable to locate package ^llvm-.*
apache#35 0.511 E: Couldn't find any package by glob '^llvm-.*'
apache#35 0.511 E: Couldn't find any package by regex '^llvm-.*'
apache#35 0.511 E: Unable to locate package ^mongodb-.*
apache#35 0.511 E: Couldn't find any package by glob '^mongodb-.*'
apache#35 0.511 EPackage 'php-crypt-gpg' is not installed, so not removed
apache#35 0.511 Package 'php' is not installed, so not removed
apache#35 0.511 : Couldn't find any package by regex '^mongodb-.*'
apache#35 0.511 E: Unable to locate package snapd
apache#35 0.511 E: Unable to locate package google-chrome-stable
apache#35 0.511 E: Unable to locate package microsoft-edge-stable
apache#35 0.511 E: Unable to locate package firefox
apache#35 0.511 E: Unable to locate package azure-cli
apache#35 0.511 E: Unable to locate package google-cloud-sdk
apache#35 0.511 E: Unable to locate package mono-devel
apache#35 0.511 E: Unable to locate package powershell
apache#35 DONE 0.5s

apache#36 [30/31] RUN apt-get autoremove --purge -y
apache#36 0.063 Reading package lists...
apache#36 0.079 Building dependency tree...
apache#36 0.082 Reading state information...
apache#36 0.088 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
apache#36 DONE 0.4s
```

After:
```
apache#38 [32/36] RUN apt-get remove --purge -y     'gfortran-11' 'humanity-icon-theme' 'nodejs-doc' || true
apache#38 0.066 Reading package lists...
apache#38 0.087 Building dependency tree...
apache#38 0.089 Reading state information...
apache#38 0.094 The following packages were automatically installed and are no longer required:
apache#38 0.094   at-spi2-core bzip2-doc dbus-user-session dconf-gsettings-backend
apache#38 0.095   dconf-service gsettings-desktop-schemas gtk-update-icon-cache
apache#38 0.095   hicolor-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data
apache#38 0.095   libatspi2.0-0 libbz2-dev libcairo-gobject2 libcolord2 libdconf1 libepoxy0
apache#38 0.095   libgfortran-11-dev libgtk-3-common libjs-highlight.js libllvm11
apache#38 0.095   libncurses-dev libncurses5-dev libphobos2-ldc-shared98 libreadline-dev
apache#38 0.095   librsvg2-2 librsvg2-common libvte-2.91-common libwayland-client0
apache#38 0.095   libwayland-cursor0 libwayland-egl1 libxdamage1 libxkbcommon0
apache#38 0.095   session-migration tilix-common xkb-data
apache#38 0.095 Use 'apt autoremove' to remove them.
apache#38 0.096 The following packages will be REMOVED:
apache#38 0.096   adwaita-icon-theme* gfortran* gfortran-11* humanity-icon-theme* libgtk-3-0*
apache#38 0.096   libgtk-3-bin* libgtkd-3-0* libvte-2.91-0* libvted-3-0* nodejs-doc*
apache#38 0.096   r-base-dev* tilix* ubuntu-mono*
apache#38 0.248 0 upgraded, 0 newly installed, 13 to remove and 0 not upgraded.
apache#38 0.248 After this operation, 99.6 MB disk space will be freed.
...
(Reading database ... 70597 files and directories currently installed.)
apache#38 0.304 Removing r-base-dev (4.1.2-1ubuntu2) ...
apache#38 0.319 Removing gfortran (4:11.2.0-1ubuntu1) ...
apache#38 0.340 Removing gfortran-11 (11.4.0-1ubuntu1~22.04) ...
apache#38 0.356 Removing tilix (1.9.4-2build1) ...
apache#38 0.377 Removing libvted-3-0:amd64 (3.10.0-1ubuntu1) ...
apache#38 0.392 Removing libvte-2.91-0:amd64 (0.68.0-1) ...
apache#38 0.407 Removing libgtk-3-bin (3.24.33-1ubuntu2) ...
apache#38 0.422 Removing libgtkd-3-0:amd64 (3.10.0-1ubuntu1) ...
apache#38 0.436 Removing nodejs-doc (12.22.9~dfsg-1ubuntu3.4) ...
apache#38 0.457 Removing libgtk-3-0:amd64 (3.24.33-1ubuntu2) ...
apache#38 0.488 Removing ubuntu-mono (20.10-0ubuntu2) ...
apache#38 0.754 Removing humanity-icon-theme (0.6.16) ...
apache#38 1.362 Removing adwaita-icon-theme (41.0-1ubuntu1) ...
apache#38 1.537 Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
apache#38 1.566 Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
apache#38 1.577 Processing triggers for libglib2.0-0:amd64 (2.72.4-0ubuntu2.2) ...
(Reading database ... 56946 files and directories currently installed.)
apache#38 1.645 Purging configuration files for libgtk-3-0:amd64 (3.24.33-1ubuntu2) ...
apache#38 1.657 Purging configuration files for ubuntu-mono (20.10-0ubuntu2) ...
apache#38 1.670 Purging configuration files for humanity-icon-theme (0.6.16) ...
apache#38 1.682 Purging configuration files for adwaita-icon-theme (41.0-1ubuntu1) ...
apache#38 DONE 1.7s

apache#39 [33/36] RUN apt-get autoremove --purge -y
apache#39 0.061 Reading package lists...
apache#39 0.075 Building dependency tree...
apache#39 0.077 Reading state information...
apache#39 0.083 The following packages will be REMOVED:
apache#39 0.083   at-spi2-core* bzip2-doc* dbus-user-session* dconf-gsettings-backend*
apache#39 0.083   dconf-service* gsettings-desktop-schemas* gtk-update-icon-cache*
apache#39 0.083   hicolor-icon-theme* libatk-bridge2.0-0* libatk1.0-0* libatk1.0-data*
apache#39 0.083   libatspi2.0-0* libbz2-dev* libcairo-gobject2* libcolord2* libdconf1*
apache#39 0.083   libepoxy0* libgfortran-11-dev* libgtk-3-common* libjs-highlight.js*
apache#39 0.083   libllvm11* libncurses-dev* libncurses5-dev* libphobos2-ldc-shared98*
apache#39 0.083   libreadline-dev* librsvg2-2* librsvg2-common* libvte-2.91-common*
apache#39 0.083   libwayland-client0* libwayland-cursor0* libwayland-egl1* libxdamage1*
apache#39 0.083   libxkbcommon0* session-migration* tilix-common* xkb-data*
apache#39 0.231 0 upgraded, 0 newly installed, 36 to remove and 0 not upgraded.
apache#39 0.231 After this operation, 124 MB disk space will be freed.
```

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
- Manually test.
- Pass GA.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#46258 from panbingkun/remove_packages_on_ubuntu.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants