diff --git a/VERSION b/VERSION index e01025862f79350522cba47477d9bb6c51729e12..7ec1d6db40877765247db18e7f9a4e36a0def4ad 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.5 +2.1.0 diff --git a/containers/builder/' b/containers/builder/' new file mode 100644 index 0000000000000000000000000000000000000000..0d567935641d0c62d84129b29259c5d2cb1f4698 --- /dev/null +++ b/containers/builder/' @@ -0,0 +1,78 @@ +# Builder with Argonne EIC software +# +FROM eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_spack:0.15.3 + +LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ + name="eic_builder" \ + group="eic_builder" \ + march="native" \ + basedist="ubuntu" \ + base="ubuntu" + +ENV DOCKERFILE_BASE=ubuntu \ + DOCKERFILE_DISTRO=ubuntu \ + DOCKERFILE_DISTRO_VERSION=20.04 \ + SPACK_ROOT=/opt/spack \ + DEBIAN_FRONTEND=noninteractive \ + CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ + container=docker + +## Ensure an up-to-date custom package list +RUN rm -rf $SPACK_ROOT/np-spack \ + && git clone https://eicweb.phy.anl.gov/EIC/np-spack.git $SPACK_ROOT/np-spack \ + && cd $SPACK_ROOT/np-spack && git checkout v`spack --version` && cd - \ + && rm -rf $SPACK_ROOT/np-spack/.git \ + && echo "repos:" > $SPACK_ROOT/etc/spack/repos.yaml \ + && echo " - $SPACK_ROOT/np-spack" >> $SPACK_ROOT/etc/spack/repos.yaml + +## Setup our environment definition +COPY spack.yaml /opt/spack-environment/spack.yaml + +## Install the software, no garbage collection at this stage +## as this is a raw builder image +RUN cd /opt/spack-environment \ + && spack env activate . \ + && spack install -j32 \ + && spack clean -a + +## Install additional python packages +RUN cd /opt/spack-environment && spack env activate . \ + && pip install --trusted-host pypi.org \ + --trusted-host files.pythonhosted.org \ + --no-cache-dir \ + ipython matplotlib scipy + +## Build elements prone to change here, to allow us to rebuild +## from runner cache efficiently +RUN cd /opt/spack-environment \ + && spack env activate . \ + && spack add npdet@master \ + && spack install \ + && spack clean -a + +## Strip the binaries +#RUN find -L /usr/local/* -type f -exec readlink -f '{}' \; | \ +# xargs file -i | \ +# grep 'charset=binary' | \ +# grep 'x-executable\|x-archive\|x-sharedlib' | \ +# awk -F: '{print $1}' | xargs strip -s + +# Modifications to the environment that are necessary to run +# Also make sure we keep the /lib/x86_65-linux-gnu in our PATH +RUN cd /opt/spack-environment \ + && spack env activate --sh -d . > /etc/profile.d/z10_spack_environment.sh \ + && sed -i "s?LD_LIBRARY_PATH=?&/lib/x86_64-linux-gnu:?" /etc/profile.d/z10_spack_environment.sh + +# Somehow PODIO env isn't automatically set, +# and Gaudi likes BINARY_TAG to be set +RUN cd /opt/spack-environment \ + && spack env activate . \ + && export PODIO=`spack find -p podio | grep software | awk '{print $2}'` \ + && echo "export PODIO=${PODIO};" >> /etc/profile.d/z10_spack_environment.sh \ + && echo "export BINARY_TAG=x86_64-linux-gcc9-opt" >> /etc/profile.d/z10_spack_environment.sh + +## make sure we have the entrypoints setup correctly +ENTRYPOINT [] +CMD ["bash", "--rcfile", "/etc/profile", "-l"] +USER 0 +WORKDIR / diff --git a/containers/builder/Dockerfile b/containers/builder/Dockerfile index f0713ee05981aeb90cdf8063a1bdd7ecfffe4359..98c012c7bf2be9cb13561605f2e3b3ac75486ac5 100644 --- a/containers/builder/Dockerfile +++ b/containers/builder/Dockerfile @@ -1,6 +1,6 @@ # Builder with Argonne EIC software # -FROM eicweb.phy.anl.gov:4567/containers/image_recipes/eic_spack:1.0.0 +FROM eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_spack:0.15.3 LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ name="eic_builder" \ @@ -20,36 +20,57 @@ ENV DOCKERFILE_BASE=ubuntu \ ## Ensure an up-to-date custom package list RUN rm -rf $SPACK_ROOT/np-spack \ && git clone https://eicweb.phy.anl.gov/EIC/np-spack.git $SPACK_ROOT/np-spack \ + && cd $SPACK_ROOT/np-spack && git checkout v`spack --version` && cd - \ && rm -rf $SPACK_ROOT/np-spack/.git \ && echo "repos:" > $SPACK_ROOT/etc/spack/repos.yaml \ && echo " - $SPACK_ROOT/np-spack" >> $SPACK_ROOT/etc/spack/repos.yaml -## Install the software, building on the existing root environment. -RUN cd /opt/spack-environment && spack env activate . \ - && spack add npdet@master \ - && spack install \ +## Setup our environment definition +COPY spack.yaml /opt/spack-environment/spack.yaml + +## Install the software, no garbage collection at this stage +## as this is a raw builder image +RUN cd /opt/spack-environment \ + && spack env activate . \ + && spack install -j32 \ && spack clean -a -## FIXME: ipython etc should be added upstream +## Install additional python packages RUN cd /opt/spack-environment && spack env activate . \ && pip install --trusted-host pypi.org \ --trusted-host files.pythonhosted.org \ --no-cache-dir \ ipython matplotlib scipy +## Build elements prone to change here, to allow us to rebuild +## from runner cache efficiently +RUN cd /opt/spack-environment \ + && spack env activate . \ + && spack add npdet@master \ + && spack install \ + && spack clean -a + ## Strip the binaries -#RUN find -L /opt/view/* -type f -exec readlink -f '{}' \; | \ +#RUN find -L /usr/local/* -type f -exec readlink -f '{}' \; | \ # xargs file -i | \ # grep 'charset=binary' | \ # grep 'x-executable\|x-archive\|x-sharedlib' | \ # awk -F: '{print $1}' | xargs strip -s # Modifications to the environment that are necessary to run -RUN cd /opt/spack-environment && \ - spack env activate --sh -d . > /etc/profile.d/z10_spack_environment.sh && \ - echo "export BINARY_TAG=x86_64-linux-gcc9-opt" >> /etc/profile.d/z10_spack_environment.sh +# Also make sure we keep the /lib/x86_65-linux-gnu in our PATH +RUN cd /opt/spack-environment \ + && spack env activate --sh -d . > /etc/profile.d/z10_spack_environment.sh \ + && sed -i "s?LD_LIBRARY_PATH=?&/lib/x86_64-linux-gnu:?" /etc/profile.d/z10_spack_environment.sh -## +# Add some extra environment variables +# Somehow PODIO env isn't automatically set, +# and Gaudi likes BINARY_TAG to be set +RUN cd /opt/spack-environment \ + && spack env activate . \ + && export PODIO=`spack find -p podio | grep software | awk '{print $2}'` \ + && echo "export PODIO=${PODIO};" >> /etc/profile.d/z10_spack_environment.sh \ + && echo "export BINARY_TAG=x86_64-linux-gcc9-opt" >> /etc/profile.d/z10_spack_environment.sh ## make sure we have the entrypoints setup correctly ENTRYPOINT [] diff --git a/containers/builder/spack.yaml b/containers/builder/spack.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b3b0901911cb67f17f89817c826d690657cdafeb --- /dev/null +++ b/containers/builder/spack.yaml @@ -0,0 +1,28 @@ +spack: + specs: + - cmake@3.17.3 + - fmt@6.1.2 cxxstd=17 + - spdlog@1.5.0 + - nlohmann-json + - heppdt@3.04.01 + - clhep@2.4.1.3 cxxstd=17 + - eigen@3.3.7 + - python@3.7.7 + - py-pip + - py-numpy + - py-pyyaml + - py-yapf + - xrootd@4.12.3 cxxstd=17 +python + - root@6.22.00 cxxstd=17 +dataframe +fftw +fortran +gdml +http +mlp +pythia8 +root7 +tmva +vc +xrootd +ssl ^mesa+opengl -llvm -osmesa + - pythia8@8244 + - hepmc3@3.2.2 +python +rootio + - stow@2.2.2 + - podio@0.11.0 + - geant4@10.6.2 cxxstd=17 +opengl +vecgeom +x11 +qt ^qt +opengl + - dd4hep@1.13.1 +geant4 +assimp +hepmc3 + - acts@0.29.0 +dd4hep +digitization +identification +json +tgeo + - gaudi@33.2 + concretization: together + config: + install_tree: /opt/software + view: /usr/local diff --git a/containers/release/Dockerfile.in b/containers/release/Dockerfile.in index 7bbf7c308821ec7b369228a5601c6b1d3756b5cf..14a5577acf7ee0594f9d22d5980202ee51789237 100644 --- a/containers/release/Dockerfile.in +++ b/containers/release/Dockerfile.in @@ -5,7 +5,7 @@ FROM eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest as buil RUN cd /opt/spack-environment && spack env activate . && spack gc -y # Strip all the binaries -RUN find -L /opt/view/* -type f -exec readlink -f '{}' \; | \ +RUN find -L /usr/local/* -type f -exec readlink -f '{}' \; | \ xargs file -i | \ grep 'charset=binary' | \ grep 'x-executable\|x-archive\|x-sharedlib' | \ @@ -29,15 +29,8 @@ ENV DOCKERFILE_DISTRO=ubuntu \ ## Copy over files from builder COPY --from=builder /opt/spack-environment /opt/spack-environment COPY --from=builder /opt/software /opt/software -COPY --from=builder /opt/view /opt/view - -## Symlink /opt/view to /usr/local -## Maybe in a future release we should install the view directly to /usr/local -## Note that this is mostly useful for downstream use of the container (e.g. -## using the default install prefix for cmake-based builds), as this way -## the users don't have to remember the special /opt/view directory, which is -## more an internal detail of how the container works. -RUN rm -rf /usr/local && ln -s /opt/view /usr/local +RUN rm -rf /usr/local +COPY --from=builder /usr/local /usr/local ## eic-shell and environment scripts. Not strictly needed anymore now we auto-load ## the environment but still provided for backward compatibility (and documentation). diff --git a/containers/release/configure_release.sh b/containers/release/configure_release.sh index 6e3399e508b00f2e16d615fd6a6564aa35575f1d..144cf4d21df7017d3c6348e08638a0ca51087640 100644 --- a/containers/release/configure_release.sh +++ b/containers/release/configure_release.sh @@ -9,10 +9,6 @@ mkdir -p config cp /etc/profile.d/z10_spack_environment.sh config/spack-env.sh -## ensure we also have /lib/x86_64-linux-gnu in our library path -## as it contains important ubuntu system libraries -sed -i "s?LD_LIBRARY_PATH=?&/lib/x86_64-linux-gnu:?" config/spack-env.sh - ## Spack sets the man-path, which stops bash from using the default man-path ## We can fix this by appending a trailing colon to MANPATH sed -i '/MANPATH/ s/;$/:;/' config/spack-env.sh