Skip to content

Commit

Permalink
Forcefully bootstrap spack into SPACK_ROOT & remove non deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Sep 2, 2024
1 parent dd8608d commit fde6fc6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
6 changes: 6 additions & 0 deletions spack/2a-precomp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ RUN set -ex \
&& apt-get autoclean -y


# Bootstrap spack (spack bootstrap now is not available in 0.18)
RUN spack bootstrap root "${SPACK_ROOT}/lib/spack-bootstrap" \
&& spack solve zlib \
&& spack clean -a


# Detect our bootstrapping compiler
RUN spack compiler find --scope site \
&& spack config --scope site add 'packages:all:target:[x86_64]' \
Expand Down
7 changes: 1 addition & 6 deletions spack/3a-precomp/baselibs.lst
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
cmake
curl
doxygen
m4
openssl +shared certs=mozilla
pkgconf
py-mpi4py
py-numpy
py-pip
py-pyyaml ~libyaml
python
zlib
1 change: 0 additions & 1 deletion spack/6-optlibs/optlibs.lst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
hdf5
libyaml
netcdf-c
paraconf
py-pybind11
Expand Down
37 changes: 37 additions & 0 deletions spack/7-finalize/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,44 @@ ENV HOME=/home/ci

FROM main AS test


USER root:root
WORKDIR /root
ENV HOME=/root

RUN set -ex \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& apt-get autoclean -y

USER ci:ci
WORKDIR /home/ci
ENV HOME=/home/ci

RUN curl --output pdi.tar.gz -L https://github.com/pdidev/pdi/archive/refs/heads/main.tar.gz

USER root:root
WORKDIR /root
ENV HOME=/root

RUN set -ex \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get purge -y \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*

USER ci:ci
WORKDIR /home/ci
ENV HOME=/home/ci


RUN tar -xf pdi.tar.gz
RUN export VERBOSE=1 \
&& bash pdi*/bin/build_and_run_all_tests
Expand Down

0 comments on commit fde6fc6

Please sign in to comment.