Skip to content

Commit

Permalink
feat: rm setup_detectors in jug_xl
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc committed May 15, 2024
1 parent 4a53e0e commit aed162c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 269 deletions.
4 changes: 0 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,6 @@ jug_xl:default:
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg INTERNAL_TAG=${INTERNAL_TAG}-default
--build-arg JUG_VERSION=${EXPORT_TAG}-$(git rev-parse HEAD)
--build-arg jobs=${JOBS}
--build-context detectors=.
--provenance false
containers/jug
2>&1 | tee build.log
Expand Down Expand Up @@ -503,8 +501,6 @@ jug_xl:nightly:
--build-arg INTERNAL_TAG=${INTERNAL_TAG}-nightly
--build-arg JUG_VERSION=${EXPORT_TAG}-nightly-$(git rev-parse HEAD)-$(date +%Y-%m-%d_%H-%M-%S)
--build-arg NIGHTLY=1
--build-arg jobs=${JOBS}
--build-context detectors=.
--provenance false
containers/jug
2>&1 | tee build.log
Expand Down
18 changes: 9 additions & 9 deletions containers/jug/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,16 @@ ccache --show-stats
ccache --zero-stats
EOF

## Create views at /usr/local and /opt/detectors
## Create views at /usr/local and /opt/detector
RUN <<EOF
set -e
rm -r /usr/local
sed -i -e '/view: false/d' ${SPACK_ENV}/spack.yaml
cat /opt/spack-environment/view.yaml >> ${SPACK_ENV}/spack.yaml
spack -e ${SPACK_ENV} env view regenerate /usr/local
spack -e ${SPACK_ENV} env view regenerate /opt/detectors
if [[ -n $NIGHTLY && -f /opt/detectors/epic ]] ; then
ln -s /opt/detectors/epic-main/setup.sh /opt/detectors/setup.sh
spack -e ${SPACK_ENV} env view regenerate /opt/detector
if [[ -n $NIGHTLY && -f /opt/detector/epic ]] ; then
ln -s /opt/detector/epic-main/setup.sh /opt/detector/setup.sh
fi
EOF

Expand Down Expand Up @@ -314,7 +314,7 @@ 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 /opt/._detectors /opt/._detectors
COPY --from=staging /opt/._detector /opt/._detector
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
Expand All @@ -328,13 +328,13 @@ SHELL ["docker-shell"]
## ensure /usr/local is the view, not a symlink
RUN <<EOF
set -ex
rm -rf /usr/local /opt/detectors
rm -rf /usr/local /opt/detector
LOCAL_PREFIX_PATH=$(realpath $(ls /usr/._local/ | tail -n1))
mv /usr/._local/${LOCAL_PREFIX_PATH} /usr/local
ln -s /usr/local /usr/._local/${LOCAL_PREFIX_PATH}
DETECTORS_PREFIX_PATH=$(realpath $(ls /opt/._detectors/ | tail -n1))
mv /opt/._detectors/${DETECTORS_PREFIX_PATH} /opt/detectors
ln -s /opt/detectors /opt/._detectors/${DETECTORS_PREFIX_PATH}
DETECTOR_PREFIX_PATH=$(realpath $(ls /opt/._detector/ | tail -n1))
mv /opt/._detector/${DETECTOR_PREFIX_PATH} /opt/detector
ln -s /opt/detector /opt/._detector/${DETECTOR_PREFIX_PATH}
EOF

## set ROOT TFile forward compatibility
Expand Down
205 changes: 0 additions & 205 deletions containers/jug/setup_detectors.py

This file was deleted.

24 changes: 0 additions & 24 deletions containers/jug/xl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,8 @@ ARG INTERNAL_TAG="testing"
FROM ${DOCKER_REGISTRY}${BASE_IMAGE}:${INTERNAL_TAG}
ARG TARGETPLATFORM

ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects"
ARG jobs=1

## version will automatically bust cache for nightly, as it includes
## the date
ARG JUG_VERSION=1

RUN echo " - jug_xl: ${JUG_VERSION}" >> /etc/jug_info

## also install detector/ip geometries into opt
ARG NIGHTLY=''
## cache bust when updated repositories
# - just master on eicweb (FIXME too narrow)
ADD ${EICWEB}/473/repository/tree?ref=master /tmp/473.json
ADD ${EICWEB}/452/repository/tree?ref=master /tmp/452.json
# - all branches for ip6 and epic on github
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} <<EOF
set -e
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
26 changes: 0 additions & 26 deletions detectors.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion spack-environment/view.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
exclude: [epic]
link_type: symlink
detectors:
root: /opt/detectors
root: /opt/detector
select: [epic]
projections:
all: '{name}-{version}'
Expand Down

0 comments on commit aed162c

Please sign in to comment.