Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • containers/eic_container
  • wdconinc/eic_container
  • tooba/eic_container
3 results
Show changes
Commits on Source (2)
......@@ -63,8 +63,8 @@ workflow:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-\(alpha\|beta\|stable\)/' ## main stable branch: vX.Y-stable
- if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-[a-z]+-\(alpha\|beta\|stable\)/' ## special stable branch: vX.Y-acadia-stable (etc)
- if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-(alpha|beta|stable)/' ## main stable branch: vX.Y-stable
- if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-[a-z]+-(alpha|beta|stable)/' ## special stable branch: vX.Y-acadia-stable (etc)
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/' ## commit tags start with vX.Y.Z with optional suffix
## plan:
......
......@@ -17,13 +17,13 @@ ENV CLICOLOR_FORCE=1 \
## Install additional packages. Remove the auto-cleanup functionality
## for docker, as we're using the new buildkit cache instead.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime \
&& echo "US/Eastern" > /etc/timezone \
&& apt-get -yqq update \
&& apt-get -yqq install --no-install-recommends \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked <<EOF
rm -f /etc/apt/apt.conf.d/docker-clean
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
echo "US/Eastern" > /etc/timezone
apt-get -yqq update
apt-get -yqq install --no-install-recommends \
bc \
bzip2 \
ca-certificates \
......@@ -53,50 +53,40 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
time \
unzip \
vim-nox \
wget \
&& apt-get -yqq autoremove \
&& localedef -i en_US -f UTF-8 en_US.UTF-8
wget
apt-get -yqq autoremove
localedef -i en_US -f UTF-8 en_US.UTF-8
EOF
# Install updated compilers, with support for multiple base images
## Ubuntu: latest gcc from toolchain ppa, latest stable clang
## Debian: default gcc with distribution, latest stable clang
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
. /etc/os-release \
&& mkdir -p /etc/apt/source.list.d \
&& if [ "${ID}" = "ubuntu" ] ; then \
echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/ \
${VERSION_CODENAME} main" \
> /etc/apt/source.list.d/ubuntu-toolchain.list \
&& if [ "${VERSION_ID}" = "20.04" ] ; then GCC="-10" CLANG="-12" ; fi\
&& if [ "${VERSION_ID}" = "22.04" ] ; then GCC="-12" CLANG="-14" ; fi\
&& curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -\
&& echo "deb http://apt.llvm.org/${VERSION_CODENAME} \
llvm-toolchain-${VERSION_CODENAME}${CLANG} main" \
> /etc/apt/source.list.d/llvm.list \
&& apt-get -yqq update \
&& apt-get -yqq install \
gcc${GCC} g++${GCC} gfortran${GCC} \
&& apt-get -yqq install \
clang${CLANG} clang-tidy${CLANG} clang-format${CLANG} \
iwyu \
&& update-alternatives --install /usr/bin/gcc gcc \
/usr/bin/gcc${GCC} 100 \
&& update-alternatives --install /usr/bin/g++ g++ \
/usr/bin/g++${GCC} 100 \
&& update-alternatives --install /usr/bin/gfortran gfortran \
/usr/bin/gfortran${GCC} 100 \
&& update-alternatives --install /usr/bin/clang clang \
/usr/bin/clang${CLANG} 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ \
/usr/bin/clang++${CLANG} 100 \
; else \
apt-get -yqq update \
&& apt-get -yqq install \
gcc g++ gfortran \
clang clang-tidy clang-format \
iwyu \
; fi \
&& apt-get -yqq autoremove \
&& gcc --version \
&& clang --version
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked <<EOF
. /etc/os-release
mkdir -p /etc/apt/source.list.d
if [ "${ID}" = "ubuntu" ] ; then
echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/${VERSION_CODENAME} main" > /etc/apt/source.list.d/ubuntu-toolchain.list
if [ "${VERSION_ID}" = "20.04" ] ; then GCC="-10" CLANG="-12" ; fi
if [ "${VERSION_ID}" = "22.04" ] ; then GCC="-12" CLANG="-14" ; fi
curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
echo "deb http://apt.llvm.org/${VERSION_CODENAME} llvm-toolchain-${VERSION_CODENAME}${CLANG} main" > /etc/apt/source.list.d/llvm.list
apt-get -yqq update
apt-get -yqq install gcc${GCC} g++${GCC} gfortran${GCC}
apt-get -yqq install clang${CLANG} clang-tidy${CLANG} clang-format${CLANG}
apt-get -yqq install iwyu
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc${GCC} 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++${GCC} 100
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran${GCC} 100
update-alternatives --install /usr/bin/clang clang /usr/bin/clang${CLANG} 100
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++${CLANG} 100
else
apt-get -yqq update
apt-get -yqq install gcc g++ gfortran
apt-get -yqq install clang clang-tidy clang-format
apt-get -yqq install iwyu
fi
apt-get -yqq autoremove
gcc --version
clang --version
EOF
......@@ -12,15 +12,16 @@ ARG TARGETPLATFORM
## install some extra spack dependencies
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${TARGETPLATFORM} \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked,id=${TARGETPLATFORM} \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get -yqq update \
&& apt-get -yqq install --no-install-recommends \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked,id=${TARGETPLATFORM} <<EOF
rm -f /etc/apt/apt.conf.d/docker-clean
apt-get -yqq update
apt-get -yqq install --no-install-recommends \
python3 \
python3-dev \
python3-distutils \
python3-boto3 \
python-is-python3
EOF
## Setup spack
ENV SPACK_ROOT=/opt/spack
......@@ -28,66 +29,61 @@ ARG SPACK_ORGREPO="spack/spack"
ARG SPACK_VERSION="releases/v0.20"
ARG SPACK_CHERRYPICKS=""
ADD https://api.github.com/repos/${SPACK_ORGREPO}/commits/${SPACK_VERSION} /tmp/spack.json
RUN git clone --filter=tree:0 https://github.com/${SPACK_ORGREPO}.git ${SPACK_ROOT} \
&& git -C ${SPACK_ROOT} checkout ${SPACK_VERSION} \
&& if [ -n "${SPACK_CHERRYPICKS}" ] ; then \
SPACK_CHERRYPICKS=$( \
git -C ${SPACK_ROOT} rev-list --topo-order ${SPACK_CHERRYPICKS} \
| grep -m $(echo ${SPACK_CHERRYPICKS} | wc -w) \
"${SPACK_CHERRYPICKS}" \
| tac \
) ; \
git -C ${SPACK_ROOT} cherry-pick -n ${SPACK_CHERRYPICKS} ; \
fi \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
/usr/bin/docker-shell \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
/usr/bin/interactive-shell \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
/usr/bin/spack-env
RUN <<EOF
git clone --filter=tree:0 https://github.com/${SPACK_ORGREPO}.git ${SPACK_ROOT}
git -C ${SPACK_ROOT} checkout ${SPACK_VERSION}
if [ -n "${SPACK_CHERRYPICKS}" ] ; then
SPACK_CHERRYPICKS=$(git -C ${SPACK_ROOT} rev-list --topo-order ${SPACK_CHERRYPICKS} | grep -m $(echo ${SPACK_CHERRYPICKS} | wc -w) "${SPACK_CHERRYPICKS}" | tac)
git -C ${SPACK_ROOT} cherry-pick -n ${SPACK_CHERRYPICKS}
fi
ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/bin/docker-shell
ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/bin/interactive-shell
ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/bin/spack-env
EOF
SHELL ["docker-shell"]
## Setup build configuration
ARG jobs=64
RUN declare -A target=( \
["linux/amd64"]="x86_64_v2" \
["linux/arm64"]="aarch64" \
) \
&& 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}" \
&& spack config --scope user add "config:db_lock_timeout:${jobs}00" \
&& spack config --scope user add "config:source_cache:/var/cache/spack" \
&& spack config --scope user add "config:install_tree:root:/opt/software" \
&& spack config --scope user add "config:ccache:true" \
&& spack config blame config \
&& spack compiler find --scope site \
&& spack config blame compilers
RUN <<EOF
declare -A target=(["linux/amd64"]="x86_64_v2" ["linux/arm64"]="aarch64")
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}"
spack config --scope user add "config:db_lock_timeout:${jobs}00"
spack config --scope user add "config:source_cache:/var/cache/spack"
spack config --scope user add "config:install_tree:root:/opt/software"
spack config --scope user add "config:ccache:true"
spack config blame config
spack compiler find --scope site
spack config blame compilers
EOF
## Setup local buildcache mirrors
RUN --mount=type=cache,target=/var/cache/spack \
spack mirror add local /var/cache/spack/mirror/${SPACK_VERSION} \
&& spack buildcache update-index local \
&& spack mirror list
RUN --mount=type=cache,target=/var/cache/spack <<EOF
spack mirror add local /var/cache/spack/mirror/${SPACK_VERSION}
spack buildcache update-index local
spack mirror list
EOF
## Setup eics3 buildcache mirrors
## - this always adds the read-only mirror to the container
## - the write-enabled mirror is provided later as a secret mount
ARG S3_ACCESS_KEY=""
ARG S3_SECRET_KEY=""
RUN --mount=type=cache,target=/var/cache/spack \
if [ -n "${S3_ACCESS_KEY}" ] ; then \
spack mirror add --scope site \
RUN --mount=type=cache,target=/var/cache/spack <<EOF
if [ -n "${S3_ACCESS_KEY}" ] ; then
spack mirror add --scope site \
--s3-endpoint-url https://eics3.sdcc.bnl.gov:9000 \
--s3-access-key-id "${S3_ACCESS_KEY}" \
--s3-access-key-secret "${S3_SECRET_KEY}" \
eics3 s3://eictest/EPIC/spack/${SPACK_VERSION} \
; fi \
&& spack mirror list
eics3 s3://eictest/EPIC/spack/${SPACK_VERSION}
fi
spack mirror list
EOF
## Setup eic-spack
ENV EICSPACK_ROOT=${SPACK_ROOT}/var/spack/repos/eic-spack
......@@ -95,21 +91,25 @@ ARG EICSPACK_ORGREPO="eic/eic-spack"
ARG EICSPACK_VERSION="$SPACK_VERSION"
ARG EICSPACK_CHERRYPICKS=""
ADD https://api.github.com/repos/${EICSPACK_ORGREPO}/commits/${EICSPACK_VERSION} /tmp/eic-spack.json
RUN git clone --filter=tree:0 https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT} \
&& git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION} \
&& if [ -n "${EICSPACK_CHERRYPICKS}" ] ; then \
git -C ${EICSPACK_ROOT} cherry-pick -n ${EICSPACK_CHERRYPICKS} ; \
fi \
&& spack repo add --scope site "${EICSPACK_ROOT}"
RUN <<EOF
git clone --filter=tree:0 https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT}
git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION}
if [ -n "${EICSPACK_CHERRYPICKS}" ] ; then
git -C ${EICSPACK_ROOT} cherry-pick -n ${EICSPACK_CHERRYPICKS}
fi
spack repo add --scope site "${EICSPACK_ROOT}"
EOF
## Setup key4hep-spack
ENV KEY4HEPSPACK_ROOT=${SPACK_ROOT}/var/spack/repos/key4hep-spack
ARG KEY4HEPSPACK_ORGREPO="key4hep/key4hep-spack"
ARG KEY4HEPSPACK_VERSION="main"
ADD https://api.github.com/repos/${KEY4HEPSPACK_ORGREPO}/commits/${KEY4HEPSPACK_VERSION} /tmp/key4hep-spack.json
RUN git clone --filter=tree:0 https://github.com/${KEY4HEPSPACK_ORGREPO}.git ${KEY4HEPSPACK_ROOT} \
&& git -C ${KEY4HEPSPACK_ROOT} checkout ${KEY4HEPSPACK_VERSION} \
&& spack repo add --scope site "${KEY4HEPSPACK_ROOT}"
RUN <<EOF
git clone --filter=tree:0 https://github.com/${KEY4HEPSPACK_ORGREPO}.git ${KEY4HEPSPACK_ROOT}
git -C ${KEY4HEPSPACK_ROOT} checkout ${KEY4HEPSPACK_VERSION}
spack repo add --scope site "${KEY4HEPSPACK_ROOT}"
EOF
## ========================================================================================
## STAGE1: builder
......@@ -128,25 +128,26 @@ ENV SPACK_ENV=/opt/spack-environment/${ENV}
RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
--mount=type=cache,target=/var/cache/spack \
--mount=type=secret,id=mirrors,target=/opt/spack/etc/spack/mirrors.yaml \
source $SPACK_ROOT/share/spack/setup-env.sh \
&& export CCACHE_DIR=/ccache \
&& spack buildcache update-index local \
&& spack buildcache update-index eics3rw \
&& 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" \
&& ccache --show-stats \
&& ccache --zero-stats
<<EOF
source $SPACK_ROOT/share/spack/setup-env.sh
export CCACHE_DIR=/ccache
spack buildcache update-index local
spack buildcache update-index eics3rw
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"
ccache --show-stats
ccache --zero-stats
EOF
## Create view at /usr/local
RUN --mount=type=cache,target=/var/cache/spack \
source $SPACK_ROOT/share/spack/setup-env.sh \
&& spack env activate --dir ${SPACK_ENV} \
&& rm -r /usr/local \
&& spack env view enable /usr/local
RUN --mount=type=cache,target=/var/cache/spack <<EOF
source $SPACK_ROOT/share/spack/setup-env.sh
spack env activate --dir ${SPACK_ENV}
rm -r /usr/local
spack env view enable /usr/local
EOF
## Optional, nuke the buildcache after install, before (re)caching
## This is useful when going to completely different containers,
......@@ -156,10 +157,8 @@ RUN --mount=type=cache,target=/var/cache/spack,sharing=locked \
[ -z "${CACHE_NUKE}" ] \
|| rm -rf /var/cache/spack/mirror/${SPACK_VERSION}/build_cache/*
## Including some small fixes
RUN echo "Grabbing environment info" \
&& spack env activate --sh --dir ${SPACK_ENV} \
> /etc/profile.d/z10_spack_environment.sh
## Store environment
RUN spack env activate --sh --dir ${SPACK_ENV} > /etc/profile.d/z10_spack_environment.sh
## make sure we have the entrypoints setup correctly
ENTRYPOINT []
......@@ -182,15 +181,17 @@ RUN git -C $SPACK_ROOT gc --prune=all --aggressive
## See
#https://askubuntu.com/questions/1034313/ubuntu-18-4-libqt5core-so-5-cannot-open-shared-object-file-no-such-file-or-dir
## and links therin for more info
RUN if [ -f /usr/local/lib/libQt5Core.so ] ; then \
strip --remove-section=.note.ABI-tag /usr/local/lib/libQt5Core.so;\
fi
RUN <<EOF
if [ -f /usr/local/lib/libQt5Core.so ] ; then
strip --remove-section=.note.ABI-tag /usr/local/lib/libQt5Core.so
fi
EOF
RUN spack debug report \
| sed "s/^/ - /" | sed "s/\* \*\*//" | sed "s/\*\*//" \
>> /etc/jug_info \
&& spack find --no-groups --long --variants | sed "s/^/ - /" >> /etc/jug_info \
&& spack graph --dot --installed > /opt/spack-environment/env.dot
RUN <<EOF
spack debug report | sed "s/^/ - /" | sed "s/\* \*\*//" | sed "s/\*\*//" >> /etc/jug_info
spack find --no-groups --long --variants | sed "s/^/ - /" >> /etc/jug_info
spack graph --dot --installed > /opt/spack-environment/env.dot
EOF
COPY eic-shell /usr/local/bin/eic-shell
......@@ -204,15 +205,14 @@ COPY singularity.d /.singularity.d
## Add minio client into /usr/local/bin
ADD --chmod=0755 https://dl.min.io/client/mc/release/linux-amd64/mc /usr/local/bin/mc-amd64
ADD --chmod=0755 https://dl.min.io/client/mc/release/linux-arm64/mc /usr/local/bin/mc-arm64
RUN declare -A target=( \
["linux/amd64"]="amd64" \
["linux/arm64"]="arm64" \
) \
&& mv /usr/local/bin/mc-${target[${TARGETPLATFORM}]} /usr/local/bin/mc \
&& unset target[${TARGETPLATFORM}] \
&& for t in ${target[*]} ; do \
rm /usr/local/bin/mc-${t} ; \
done
RUN <<EOF
declare -A target=(["linux/amd64"]="amd64" ["linux/arm64"]="arm64")
mv /usr/local/bin/mc-${target[${TARGETPLATFORM}]} /usr/local/bin/mc
unset target[${TARGETPLATFORM}]
for t in ${target[*]} ; do
rm /usr/local/bin/mc-${t}
done
EOF
## ========================================================================================
## STAGE 3
......@@ -236,27 +236,33 @@ 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" \
&& ln -s /usr/._local/${PREFIX_PATH} /usr/local
RUN <<EOF
rm -rf /usr/local
PREFIX_PATH=$(realpath $(ls /usr/._local/ | tail -n1))
echo "Found spack true prefix path to be $PREFIX_PATH"
ln -s /usr/._local/${PREFIX_PATH} /usr/local
EOF
## set the local spack configuration
ENV SPACK_DISABLE_LOCAL_CONFIG="true"
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
RUN <<EOF
. /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
EOF
## set the jug_dev version and add the afterburner
ARG JUG_VERSION=1
RUN echo "" >> /etc/jug_info \
&& echo " - jug_dev: ${JUG_VERSION}" >> /etc/jug_info
RUN <<EOF
echo "" >> /etc/jug_info
echo " - jug_dev: ${JUG_VERSION}" >> /etc/jug_info
EOF
## eicweb shortcut
ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects"
......@@ -271,25 +277,17 @@ 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
RUN <<EOF
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
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
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
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
EOF
## Install campaigns into the container
ARG CAMPAIGNS_SINGLE_VERSION="main"
......@@ -301,22 +299,14 @@ ADD https://api.github.com/repos/eic/simulation_campaign_single/commits/${CAMPAI
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
RUN <<EOF
mkdir -p /opt/campaigns
cd /opt/campaigns
git clone -b ${CAMPAIGNS_SINGLE_VERSION} --depth 1 https://github.com/eic/simulation_campaign_single.git single
git clone -b ${CAMPAIGNS_HEPMC3_VERSION} --depth 1 https://github.com/eic/simulation_campaign_hepmc3.git hepmc3
git clone -b ${CAMPAIGNS_CONDOR_VERSION} --depth 1 https://github.com/eic/job_submission_condor.git condor
git clone -b ${CAMPAIGNS_SLURM_VERSION} --depth 1 https://github.com/eic/job_submission_slurm.git slurm
EOF
## make sure we have the entrypoints setup correctly
ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
......@@ -327,8 +317,7 @@ 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
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
......@@ -17,8 +17,7 @@ ARG jobs=8
## the date
ARG JUG_VERSION=1
RUN cd /tmp \
&& echo " - jug_xl: ${JUG_VERSION}" >> /etc/jug_info
RUN echo " - jug_xl: ${JUG_VERSION}" >> /etc/jug_info
## also install detector/ip geometries into opt
ARG NIGHTLY=''
......@@ -31,11 +30,11 @@ ADD https://api.github.com/repos/eic/ip6 /tmp/ip6.json
ADD https://api.github.com/repos/eic/epic /tmp/epic.json
COPY setup_detectors.py /tmp
COPY --from=detectors detectors.yaml /tmp
RUN --mount=type=cache,target=/ccache/,sharing=locked,id=${TARGETPLATFORM} \
cd /tmp \
&& export CCACHE_DIR=/ccache \
&& [ "z$NIGHTLY" = "z1" ] && NIGHTLY_FLAG="--nightly" || NIGHTLY_FLAG="" \
&& /tmp/setup_detectors.py --prefix /opt/detector --config /tmp/detectors.yaml \
$NIGHTLY_FLAG \
&& ccache --show-stats \
&& rm /tmp/setup_detectors.py
RUN --mount=type=cache,target=/ccache/,sharing=locked,id=${TARGETPLATFORM} <<EOF
cd /tmp
export CCACHE_DIR=/ccache
[ "z$NIGHTLY" = "z1" ] && NIGHTLY_FLAG="--nightly" || NIGHTLY_FLAG=""
/tmp/setup_detectors.py --prefix /opt/detector --config /tmp/detectors.yaml $NIGHTLY_FLAG
ccache --show-stats
rm /tmp/setup_detectors.py
EOF