Skip to content
Snippets Groups Projects
Commit 151db45a authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: setup reconstruction and detectors with ccache

parent 72efb3e5
No related branches found
No related tags found
1 merge request!459feat: setup reconstruction and detectors with ccache
......@@ -122,6 +122,7 @@ if __name__ == '__main__':
detector=proj),
'&&',
'cmake -B /tmp/build -S /tmp/det -DCMAKE_CXX_STANDARD=17',
'-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache',
'-DCMAKE_INSTALL_PREFIX={prefix}'.format(prefix=prefix),
'&&',
'cmake --build /tmp/build -j$(($(($(nproc)/4))+1)) -- install']
......
......@@ -8,6 +8,7 @@ ARG INTERNAL_TAG="testing"
## EIC builder image with spack
## ========================================================================================
FROM ${DOCKER_REGISTRY}${BASE_IMAGE}:${INTERNAL_TAG}
ARG TARGETPLATFORM
ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects"
ARG JUGGLER_VERSION="main"
......@@ -20,8 +21,11 @@ ARG JUG_VERSION=1
RUN cd /tmp \
&& echo " - jug_xl: ${JUG_VERSION}" >> /etc/jug_info
ENV CCACHE_DIR=/ccache/$TARGETPLATFORM
ADD ${EICWEB}/369/repository/tree?ref=${JUGGLER_VERSION} /tmp/369.json
RUN cd /tmp \
RUN --mount=type=cache,target=/ccache/ \
cd /tmp \
&& echo "INSTALLING JUGGLER" \
&& git clone -b ${JUGGLER_VERSION} --depth 1 \
https://eicweb.phy.anl.gov/EIC/juggler.git \
......@@ -29,6 +33,7 @@ RUN cd /tmp
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
&& cmake --build build -j12 -- install \
&& pushd juggler \
&& echo " - juggler: ${JUGGLER_VERSION}-$(git rev-parse HEAD)" \
......@@ -37,7 +42,8 @@ RUN cd /tmp
&& rm -rf build juggler
ADD https://api.github.com/repos/eic/eicrecon/commits/${EICRECON_VERSION} /tmp/eicrecon.json
RUN cd /tmp \
RUN --mount=type=cache,target=/ccache/ \
cd /tmp \
&& echo "INSTALLING EICRECON" \
&& git clone -b ${EICRECON_VERSION} --depth 1 \
https://github.com/eic/eicrecon.git \
......@@ -45,6 +51,7 @@ RUN cd /tmp
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
&& cmake --build build -j12 -- install \
&& pushd eicrecon \
&& echo " - eicrecon: ${EICRECON_VERSION}-$(git rev-parse HEAD)" \
......@@ -121,10 +128,12 @@ 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 detectors.yaml /tmp
RUN cd /tmp \
RUN --mount=type=cache,target=/ccache/ \
cd /tmp \
&& [ "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
## Hotfix for misbehaving OSG nodes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment