Skip to content

Commit

Permalink
base: add support for ADPimega module.
Browse files Browse the repository at this point in the history
Pimega library is closed-source and its binaries and header files are
thus installed from a tarball.

Since it is an additional module to areaDetector, it is built in another
file, making it possible to better reuse caching across base image
(re)builds.

pimegaIOC in `iocs` is currently used in deploy. Thus, it is build along
with the support module. Its IOC RELEASE configuration specifies its path
relatively to the AREA_DETECTOR module, making it (without a RELEASE
patch) required to be in the areaDetector directory.

$EPICS_RELEASE_FILE is used to configure the IOC analogously to the
procedure in the IOC build. However, it is concatenated to the file, as
the ADPIMEGA module is not yet in the list.
  • Loading branch information
henriquesimoes committed Dec 1, 2023
1 parent 185c6b4 commit 39aeefb
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ IPAC_VERSION=2.16
CAPUTLOG_VERSION=R4.0

AREA_DETECTOR_VERSION=R3-12-1
ADPIMEGA_VERSION=2.5.2-1
NDSSCPIMEGA_VERSION=1.0.0

MOTOR_VERSION=R7-3-1
PMAC_VERSION=2-6-1

LIBPIMEGA_VERSION=2.5.2-0
LIBSSCPIMEGA_VERSION=fb8acf533a7c01b5266bf32d60d1a5f923e19523
11 changes: 11 additions & 0 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN apt update -y && \
build-essential \
git \
libaravis-dev \
libczmq-dev \
libjson-c-dev \
libreadline-dev \
libssh2-1-dev \
libtiff-dev \
Expand All @@ -23,6 +25,11 @@ RUN apt update -y && \
COPY lnls-get-n-unpack.sh /usr/local/bin/lnls-get-n-unpack
COPY lnls-run.sh /usr/local/bin/lnls-run

ARG LIBPIMEGA_VERSION

RUN lnls-get-n-unpack -r \
http://download.lnls.br/packages/libpimega_${LIBPIMEGA_VERSION}_amd64.tar.gz

ARG EPICS_BASE_VERSION
ENV EPICS_BASE_PATH /opt/epics/base
ENV EPICS_MODULES_PATH /opt/epics/modules
Expand All @@ -46,6 +53,7 @@ ARG IPAC_VERSION
ARG CAPUTLOG_VERSION

ARG AREA_DETECTOR_VERSION
ARG ADPIMEGA_VERSION
ARG NDSSCPIMEGA_VERSION
ARG MOTOR_VERSION
ARG PMAC_VERSION
Expand All @@ -60,5 +68,8 @@ COPY nanohttp_stream.patch .
COPY install_area_detector.sh .
RUN ./install_area_detector.sh

COPY install-ad-modules.sh .
RUN ./install-ad-modules.sh

COPY install_motor.sh .
RUN ./install_motor.sh
2 changes: 2 additions & 0 deletions base/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ services:
IPAC_VERSION: ${IPAC_VERSION}
CAPUTLOG_VERSION: ${CAPUTLOG_VERSION}
AREA_DETECTOR_VERSION: ${AREA_DETECTOR_VERSION}
ADPIMEGA_VERSION: ${ADPIMEGA_VERSION}
NDSSCPIMEGA_VERSION: ${NDSSCPIMEGA_VERSION}
MOTOR_VERSION: ${MOTOR_VERSION}
PMAC_VERSION: ${PMAC_VERSION}
LIBPIMEGA_VERSION: ${LIBPIMEGA_VERSION}
LIBSSCPIMEGA_VERSION: ${LIBSSCPIMEGA_VERSION}
21 changes: 21 additions & 0 deletions base/install-ad-modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env sh

set -eu

. /opt/epics/install-functions.sh

cd $EPICS_MODULES_PATH/areaDetector

lnls-get-n-unpack -l http://download.lnls.br/packages/ad-pimega_${ADPIMEGA_VERSION}.tar.gz

echo "BUILD_IOCS=YES" >> ADPimega/configure/CONFIG_SITE
cat $EPICS_RELEASE_FILE >> ADPimega/iocs/pimegaIOC/configure/RELEASE

install_module ADPimega ADPIMEGA "
EPICS_BASE=${EPICS_BASE_PATH}
ASYN=${EPICS_MODULES_PATH}/asyn
AREA_DETECTOR=${EPICS_MODULES_PATH}/areaDetector
ADCORE=${EPICS_MODULES_PATH}/areaDetector/ADCore
ADSUPPORT=${EPICS_MODULES_PATH}/areaDetector/ADSupport
"

0 comments on commit 39aeefb

Please sign in to comment.