From fd7b8875aed543e6ef9470b1722d78494dc4843c Mon Sep 17 00:00:00 2001 From: Wouter Deconinck <wdconinc@gmail.com> Date: Sun, 9 Oct 2022 22:23:55 +0000 Subject: [PATCH] feat: strip /opt/software, not /usr/local; build_type Release --- containers/jug/dev.Dockerfile | 8 ++++++-- spack.yaml | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/containers/jug/dev.Dockerfile b/containers/jug/dev.Dockerfile index 63f6023b9..17cf1f64a 100644 --- a/containers/jug/dev.Dockerfile +++ b/containers/jug/dev.Dockerfile @@ -179,11 +179,14 @@ WORKDIR / ## ======================================================================================== FROM builder as staging +# Garbage collect in environment RUN cd /opt/spack-environment && spack env activate . && spack gc -y + # Strip all the binaries # 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 -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 \ -o \ -type d -name lib-dynload -prune -false \ @@ -193,7 +196,8 @@ RUN find -L /usr/local/* \ | xargs file -i \ | grep 'charset=binary' \ | 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 ## See diff --git a/spack.yaml b/spack.yaml index 28202bc29..d542a792d 100644 --- a/spack.yaml +++ b/spack.yaml @@ -29,7 +29,7 @@ spack: - nlohmann-json@3.10.5 - opencascade@7.6.0 - pkg-config@0.29.2 - - podio@0.15 build_type=RelWithDebInfo + - podio@0.15 - pythia8@8.306 +fastjet - python@3.10.4 - py-numpy@1.22.3 @@ -47,4 +47,6 @@ spack: packages: all: compiler: [gcc] + variants: + build_type=Release view: /usr/local -- GitLab