Skip to content

Commit 39aeefb

Browse files
base: add support for ADPimega module.
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.
1 parent 185c6b4 commit 39aeefb

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

base/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ IPAC_VERSION=2.16
1414
CAPUTLOG_VERSION=R4.0
1515

1616
AREA_DETECTOR_VERSION=R3-12-1
17+
ADPIMEGA_VERSION=2.5.2-1
1718
NDSSCPIMEGA_VERSION=1.0.0
1819

1920
MOTOR_VERSION=R7-3-1
2021
PMAC_VERSION=2-6-1
2122

23+
LIBPIMEGA_VERSION=2.5.2-0
2224
LIBSSCPIMEGA_VERSION=fb8acf533a7c01b5266bf32d60d1a5f923e19523

base/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ RUN apt update -y && \
1111
build-essential \
1212
git \
1313
libaravis-dev \
14+
libczmq-dev \
15+
libjson-c-dev \
1416
libreadline-dev \
1517
libssh2-1-dev \
1618
libtiff-dev \
@@ -23,6 +25,11 @@ RUN apt update -y && \
2325
COPY lnls-get-n-unpack.sh /usr/local/bin/lnls-get-n-unpack
2426
COPY lnls-run.sh /usr/local/bin/lnls-run
2527

28+
ARG LIBPIMEGA_VERSION
29+
30+
RUN lnls-get-n-unpack -r \
31+
http://download.lnls.br/packages/libpimega_${LIBPIMEGA_VERSION}_amd64.tar.gz
32+
2633
ARG EPICS_BASE_VERSION
2734
ENV EPICS_BASE_PATH /opt/epics/base
2835
ENV EPICS_MODULES_PATH /opt/epics/modules
@@ -46,6 +53,7 @@ ARG IPAC_VERSION
4653
ARG CAPUTLOG_VERSION
4754

4855
ARG AREA_DETECTOR_VERSION
56+
ARG ADPIMEGA_VERSION
4957
ARG NDSSCPIMEGA_VERSION
5058
ARG MOTOR_VERSION
5159
ARG PMAC_VERSION
@@ -60,5 +68,8 @@ COPY nanohttp_stream.patch .
6068
COPY install_area_detector.sh .
6169
RUN ./install_area_detector.sh
6270

71+
COPY install-ad-modules.sh .
72+
RUN ./install-ad-modules.sh
73+
6374
COPY install_motor.sh .
6475
RUN ./install_motor.sh

base/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ services:
2323
IPAC_VERSION: ${IPAC_VERSION}
2424
CAPUTLOG_VERSION: ${CAPUTLOG_VERSION}
2525
AREA_DETECTOR_VERSION: ${AREA_DETECTOR_VERSION}
26+
ADPIMEGA_VERSION: ${ADPIMEGA_VERSION}
2627
NDSSCPIMEGA_VERSION: ${NDSSCPIMEGA_VERSION}
2728
MOTOR_VERSION: ${MOTOR_VERSION}
2829
PMAC_VERSION: ${PMAC_VERSION}
30+
LIBPIMEGA_VERSION: ${LIBPIMEGA_VERSION}
2931
LIBSSCPIMEGA_VERSION: ${LIBSSCPIMEGA_VERSION}

base/install-ad-modules.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env sh
2+
3+
set -eu
4+
5+
. /opt/epics/install-functions.sh
6+
7+
cd $EPICS_MODULES_PATH/areaDetector
8+
9+
lnls-get-n-unpack -l http://download.lnls.br/packages/ad-pimega_${ADPIMEGA_VERSION}.tar.gz
10+
11+
echo "BUILD_IOCS=YES" >> ADPimega/configure/CONFIG_SITE
12+
cat $EPICS_RELEASE_FILE >> ADPimega/iocs/pimegaIOC/configure/RELEASE
13+
14+
install_module ADPimega ADPIMEGA "
15+
EPICS_BASE=${EPICS_BASE_PATH}
16+
17+
ASYN=${EPICS_MODULES_PATH}/asyn
18+
AREA_DETECTOR=${EPICS_MODULES_PATH}/areaDetector
19+
ADCORE=${EPICS_MODULES_PATH}/areaDetector/ADCore
20+
ADSUPPORT=${EPICS_MODULES_PATH}/areaDetector/ADSupport
21+
"

0 commit comments

Comments
 (0)