Skip to content
Snippets Groups Projects

feat: use official docker image

Merged Wouter Deconinck requested to merge use-official-docker-image into master
All threads resolved!
Compare and Show latest version
7 files
+ 35
470
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -106,7 +106,9 @@ FROM spack as builder
COPY --from=spack-environment . /opt/spack-environment/
ARG ENV=dev
ARG JUGGLER_VERSION="main"
ADD https://eicweb.phy.anl.gov/api/v4/projects/EIC%2Fjuggler/repository/tree?ref=${JUGGLER_VERSION} /tmp/juggler.json
ARG EICRECON_VERSION="main"
ADD https://api.github.com/repos/eic/eicrecon/commits/${EICRECON_VERSION} /tmp/eicrecon.json
ENV SPACK_ENV=/opt/spack-environment/${ENV}
RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
--mount=type=cache,target=/var/cache/spack \
@@ -119,7 +121,8 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
&& make --jobs ${jobs} --keep-going --directory /opt/spack-environment \
SPACK_ENV=${SPACK_ENV} \
BUILDCACHE_MIRROR="local eics3rw" \
&& ccache --show-stats
&& ccache --show-stats \
&& ccache --zero-stats
## Create view at /usr/local
RUN --mount=type=cache,target=/var/cache/spack \
@@ -136,21 +139,6 @@ RUN --mount=type=cache,target=/var/cache/spack,sharing=locked \
[ -z "${CACHE_NUKE}" ] \
|| rm -rf /var/cache/spack/mirror/${SPACK_VERSION}/build_cache/*
## Extra post-spack steps:
## - Python packages
COPY requirements.txt /usr/local/etc/requirements.txt
RUN --mount=type=cache,target=/var/cache/pip,sharing=locked,id=${TARGETPLATFORM} \
echo "Installing additional python packages" \
&& source $SPACK_ROOT/share/spack/setup-env.sh \
&& spack env activate --dir ${SPACK_ENV} \
&& python -m pip install \
--trusted-host pypi.org \
--trusted-host files.pythonhosted.org \
--cache-dir /var/cache/pip \
--requirement /usr/local/etc/requirements.txt \
--no-warn-script-location
# ^ Supress not on PATH Warnings
## Including some small fixes
RUN echo "Grabbing environment info" \
&& spack env activate --sh --dir ${SPACK_ENV} \
@@ -171,10 +159,7 @@ FROM builder as staging
RUN spack -e ${SPACK_ENV} gc -y
# Garbage collect in git
RUN du -sh $SPACK_ROOT \
&& git -C $SPACK_ROOT fetch --depth=1 \
&& git -C $SPACK_ROOT gc --prune=all --aggressive \
&& du -sh $SPACK_ROOT
RUN git -C $SPACK_ROOT gc --prune=all --aggressive
## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15
## See
Loading