Skip to content
Snippets Groups Projects

feat: install juggler and eicrecon with spack

Merged Wouter Deconinck requested to merge spack-install-juggler-eicrecon into master
Files
8
@@ -50,6 +50,7 @@ RUN declare -A target=( \
) \
&& target=${target[${TARGETPLATFORM}]} \
&& spack config --scope site add "packages:all:require:[target=${target}]" \
&& spack config --scope site add "packages:all:target:[${target}]" \
&& spack config blame packages \
&& spack config --scope user add "config:suppress_gpg_warnings:true" \
&& spack config --scope user add "config:build_jobs:${jobs}" \
@@ -104,6 +105,8 @@ FROM spack as builder
## Setup our custom environment (secret mount for write-enabled mirror)
COPY --from=spack-environment . /opt/spack-environment/
ARG ENV=dev
ARG JUGGLER_VERSION="main"
ARG EICRECON_VERSION="main"
ENV SPACK_ENV=/opt/spack-environment/${ENV}
RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
--mount=type=cache,target=/var/cache/spack \
@@ -111,6 +114,8 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
source $SPACK_ROOT/share/spack/setup-env.sh \
&& export CCACHE_DIR=/ccache \
&& spack env activate --dir ${SPACK_ENV} \
&& spack add juggler@git.${JUGGLER_VERSION} \
&& spack add eicrecon@git.${EICRECON_VERSION} \
&& make --jobs ${jobs} --keep-going --directory /opt/spack-environment \
SPACK_ENV=${SPACK_ENV} \
BUILDCACHE_MIRROR="local eics3rw" \
@@ -218,22 +223,21 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="jug_xl" \
march="$TARGETPLATFORM"
## copy over everything we need from staging in a single layer :-)
RUN --mount=from=staging,target=/staging \
rm -rf /usr/local \
&& cp -r /staging/opt/spack /opt/spack \
&& cp -r /staging/opt/spack-environment /opt/spack-environment \
&& cp -r /staging/opt/software /opt/software \
&& cp -r /staging/usr/._local /usr/._local \
&& cd /usr/._local \
&& PREFIX_PATH=$(realpath $(ls | tail -n1)) \
## copy over everything we need from staging
COPY --from=staging /opt/spack /opt/spack
COPY --from=staging /opt/spack-environment /opt/spack-environment
COPY --from=staging /opt/software /opt/software
COPY --from=staging /usr/._local /usr/._local
COPY --from=staging /etc/profile.d /etc/profile.d
COPY --from=staging /etc/jug_info /etc/jug_info
COPY --from=staging /etc/eic-env.sh /etc/eic-env.sh
COPY --from=staging /.singularity.d /.singularity.d
## ensure /usr/local link is pointing to the right view
RUN rm -rf /usr/local \
&& PREFIX_PATH=$(realpath $(ls /usr/._local/ | tail -n1)) \
&& echo "Found spack true prefix path to be $PREFIX_PATH" \
&& cd - \
&& ln -s ${PREFIX_PATH} /usr/local \
&& cp /staging/etc/profile.d/*.sh /etc/profile.d/ \
&& cp /staging/etc/eic-env.sh /etc/eic-env.sh \
&& cp /staging/etc/jug_info /etc/jug_info \
&& cp -r /staging/.singularity.d /.singularity.d
&& ln -s /usr/._local/${PREFIX_PATH} /usr/local
## set the local spack configuration
ENV SPACK_DISABLE_LOCAL_CONFIG="true"
@@ -241,6 +245,8 @@ RUN . /opt/spack/share/spack/setup-env.sh \
&& spack config --scope site add "config:install_tree:root:~/spack" \
&& spack config --scope site add "config:source_cache:~/.spack/cache" \
&& spack config --scope site add "config:binary_index_root:~/.spack" \
&& spack config --scope site add "config:environments_root:~/.spack/env" \
&& spack config --scope site add "config:suppress_gpg_warnings:true" \
&& spack config blame config \
&& spack config --scope site add "upstreams:eic-shell:install_tree:/opt/software" \
&& spack config blame upstreams
@@ -250,9 +256,77 @@ ARG JUG_VERSION=1
RUN echo "" >> /etc/jug_info \
&& echo " - jug_dev: ${JUG_VERSION}" >> /etc/jug_info
## eicweb shortcut
ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects"
## Install benchmarks into the container
ARG BENCHMARK_COM_VERSION="master"
ARG BENCHMARK_DET_VERSION="master"
ARG BENCHMARK_REC_VERSION="master"
ARG BENCHMARK_PHY_VERSION="master"
## cache bust when updated repositories
ADD ${EICWEB}/458/repository/tree?ref=${BENCHMARK_COM_VERSION} /tmp/485.json
ADD ${EICWEB}/399/repository/tree?ref=${BENCHMARK_DET_VERSION} /tmp/399.json
ADD ${EICWEB}/408/repository/tree?ref=${BENCHMARK_REC_VERSION} /tmp/408.json
ADD ${EICWEB}/400/repository/tree?ref=${BENCHMARK_PHY_VERSION} /tmp/400.json
RUN mkdir -p /opt/benchmarks \
&& cd /opt/benchmarks \
&& git clone -b ${BENCHMARK_COM_VERSION} --depth 1 \
https://eicweb.phy.anl.gov/EIC/benchmarks/common_bench.git \
&& mkdir -p /opt/benchmarks \
&& cd /opt/benchmarks \
&& git clone -b ${BENCHMARK_DET_VERSION} --depth 1 \
https://eicweb.phy.anl.gov/EIC/benchmarks/detector_benchmarks.git \
&& ln -sf ../common_bench detector_benchmarks/.local \
&& mkdir -p /opt/benchmarks \
&& cd /opt/benchmarks \
&& git clone -b ${BENCHMARK_REC_VERSION} --depth 1 \
https://eicweb.phy.anl.gov/EIC/benchmarks/reconstruction_benchmarks.git \
&& ln -sf ../common_bench reconstruction_benchmarks/.local \
&& mkdir -p /opt/benchmarks \
&& cd /opt/benchmarks \
&& git clone -b ${BENCHMARK_PHY_VERSION} --depth 1 \
https://eicweb.phy.anl.gov/EIC/benchmarks/physics_benchmarks.git \
&& ln -sf ../common_bench physics_benchmarks/.local
## Install campaigns into the container
ARG CAMPAIGNS_SINGLE_VERSION="main"
ARG CAMPAIGNS_HEPMC3_VERSION="main"
ARG CAMPAIGNS_CONDOR_VERSION="main"
ARG CAMPAIGNS_SLURM_VERSION="main"
## cache bust when updated repositories
ADD https://api.github.com/repos/eic/simulation_campaign_single/commits/${CAMPAIGNS_SINGLE_VERSION} /tmp/simulation_campaign_single.json
ADD https://api.github.com/repos/eic/simulation_campaign_hepmc3/commits/${CAMPAIGNS_HEPMC3_VERSION} /tmp/simulation_campaign_hepmc3.json
ADD https://api.github.com/repos/eic/job_submission_condor/commits/${CAMPAIGNS_CONDOR_VERSION} /tmp/job_submission_condor.json
ADD https://api.github.com/repos/eic/job_submission_slurm/commits/${CAMPAIGNS_SLURM_VERSION} /tmp/job_submission_slurm.json
RUN mkdir -p /opt/campaigns \
&& cd /opt/campaigns \
&& git clone -b ${CAMPAIGNS_SINGLE_VERSION} --depth 1 \
https://github.com/eic/simulation_campaign_single.git single \
&& mkdir -p /opt/campaigns \
&& cd /opt/campaigns \
&& git clone -b ${CAMPAIGNS_HEPMC3_VERSION} --depth 1 \
https://github.com/eic/simulation_campaign_hepmc3.git hepmc3 \
&& mkdir -p /opt/campaigns \
&& cd /opt/campaigns \
&& git clone -b ${CAMPAIGNS_CONDOR_VERSION} --depth 1 \
https://github.com/eic/job_submission_condor.git condor \
&& mkdir -p /opt/campaigns \
&& cd /opt/campaigns \
&& git clone -b ${CAMPAIGNS_SLURM_VERSION} --depth 1 \
https://github.com/eic/job_submission_slurm.git slurm
## make sure we have the entrypoints setup correctly
ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
CMD ["bash", "--rcfile", "/etc/profile", "-l"]
USER 0
WORKDIR /
SHELL ["/usr/local/bin/eic-shell"]
## eic-news
COPY --chmod=0755 eic-news /usr/local/bin/eic-news
RUN echo "test -f $HOME/.eic-news && source /usr/local/bin/eic-news" \
> /etc/profile.d/z13_eic-news.sh
## Hotfix for misbehaving OSG nodes
RUN mkdir /hadoop
Loading