Skip to content
Snippets Groups Projects
Commit fd7b8875 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: strip /opt/software, not /usr/local; build_type Release

parent 1c5ff170
No related branches found
No related tags found
1 merge request!367feat: strip /opt/software, not /usr/local; build_type Release
...@@ -179,11 +179,14 @@ WORKDIR / ...@@ -179,11 +179,14 @@ WORKDIR /
## ======================================================================================== ## ========================================================================================
FROM builder as staging FROM builder as staging
# Garbage collect in environment
RUN cd /opt/spack-environment && spack env activate . && spack gc -y RUN cd /opt/spack-environment && spack env activate . && spack gc -y
# Strip all the binaries # Strip all the binaries
# This reduces the image by factor of x2, so worth the effort # This reduces the image by factor of x2, so worth the effort
# note that we do not strip python libraries as it can cause issues in some cases # note that we do not strip python libraries as it can cause issues in some cases
RUN find -L /usr/local/* \ RUN du -sh /opt/software/linux-*/gcc-*/* | sort -h \
&& find -L /opt/software/* \
-type d -name site-packages -prune -false \ -type d -name site-packages -prune -false \
-o \ -o \
-type d -name lib-dynload -prune -false \ -type d -name lib-dynload -prune -false \
...@@ -193,7 +196,8 @@ RUN find -L /usr/local/* \ ...@@ -193,7 +196,8 @@ RUN find -L /usr/local/* \
| xargs file -i \ | xargs file -i \
| grep 'charset=binary' \ | grep 'charset=binary' \
| grep 'x-executable\|x-sharedlib' \ | grep 'x-executable\|x-sharedlib' \
| awk -F: '{print $1}' | xargs strip -s | awk -F: '{print $1}' | xargs strip -s \
&& du -sh /opt/software/linux-*/gcc-*/* | sort -h
## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15 ## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15
## See ## See
......
...@@ -29,7 +29,7 @@ spack: ...@@ -29,7 +29,7 @@ spack:
- nlohmann-json@3.10.5 - nlohmann-json@3.10.5
- opencascade@7.6.0 - opencascade@7.6.0
- pkg-config@0.29.2 - pkg-config@0.29.2
- podio@0.15 build_type=RelWithDebInfo - podio@0.15
- pythia8@8.306 +fastjet - pythia8@8.306 +fastjet
- python@3.10.4 - python@3.10.4
- py-numpy@1.22.3 - py-numpy@1.22.3
...@@ -47,4 +47,6 @@ spack: ...@@ -47,4 +47,6 @@ spack:
packages: packages:
all: all:
compiler: [gcc] compiler: [gcc]
variants:
build_type=Release
view: /usr/local view: /usr/local
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment