...
- support already present in <ibek-support>
- support present as git project
- support not present at all → put in the condition 2
Use an existing ibek support
Anchor |
---|
| existing ibek support |
---|
| existing ibek support |
---|
|
If a support is present in <ibek-support>, it's very simple to use it just create a yaml that instantiates your device(s).
...
Code Block |
---|
|
##### build stage ##############################################################
ARG TARGET_ARCHITECTURE
ARG BASE=7.0.8ec1b3
ARG REGISTRY=ghcr.io/epics-containers
FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer
# The devcontainer mounts the project root to /epics/generic-source
# Using the same location here makes devcontainer/runtime differences transparent.
ENV SOURCE_FOLDER=/epics/generic-source
# connect ioc source folder to its know location
RUN ln -s ${SOURCE_FOLDER}/ioc ${IOC}
# Get latest ibek while in development. Will come from epics-base when stable
COPY requirements.txt requirements.txt
RUN pip install --upgrade -r requirements.txt
WORKDIR ${SOURCE_FOLDER}/ibek-support
# copy the global ibek files
COPY ibek-support/_global/ _global
COPY ibek-support/iocStats/ iocStats
RUN iocStats/install.sh 3.2.0
################################################################################
# TODO - Add further support module installations here
################################################################################
COPY ibek-support/asyn/ asyn/
RUN asyn/install.sh R4-44
COPY ibek-support/autosave/ autosave/
RUN autosave/install.sh R5-11
COPY ibek-support/busy/ busy/
RUN busy/install.sh R1-7-3
COPY ibek-support/StreamDevice/ StreamDevice/
RUN StreamDevice/install.sh 2.8.24
COPY ibek-support/sscan/ sscan/
RUN sscan/install.sh R2-11-6
COPY ibek-support/calc/ calc/
RUN calc/install.sh R3-7-5
COPY ibek-support/motor/ motor/
RUN motor/install.sh R7-3
COPY ibek-support/motorMotorSim/ motorMotorSim/
RUN motorMotorSim/install.sh R1-2
COPY ibek-support/ADCore/ ADCore/
RUN ADCore/install.sh R3-13
COPY ibek-support/ADGenICam ADGenICam/
RUN ADGenICam/install.sh R1-9
COPY ibek-support/ADSimDetector ADSimDetector/
RUN ADSimDetector/install.sh R2-10
COPY ibek-support/modbus/ modbus/
RUN modbus/install.sh R3-3
COPY ibek-support/screen-epics-ioc screen-epics-ioc/
RUN screen-epics-ioc/install.sh v1.3.1
COPY ibek-support/motorNewport motorNewport/
RUN motorNewport/install.sh R1-2-1
# COPY ibek-support/easy-driver-epics/ easy-driver-epics/
# RUN easy-driver-epics/install.sh master
COPY ibek-support/mydevmodule mydevmodule ### HERE
RUN mydevmodule/install.sh master ## HERE
# get the ioc source and build it
COPY ioc/ ${SOURCE_FOLDER}/ioc
RUN cd ${IOC} && ./install.sh && make
##### runtime preparation stage ################################################
FROM developer AS runtime_prep
# get the products from the build stage and reduce to runtime assets only
RUN ibek ioc extract-runtime-assets /assets ${SOURCE_FOLDER}/ibek*
##### runtime stage ############################################################
FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-runtime:${BASE} AS runtime
# get runtime assets from the preparation stage
COPY --from=runtime_prep /assets /
# install runtime system dependencies, collected from install.sh scripts
RUN ibek support apt-install-runtime-packages --skip-non-native
ENV TARGET_ARCHITECTURE ${TARGET_ARCHITECTURE}
CMD ["/bin/bash", "-c", "${IOC}/start.sh"] |
Step 3 build docker image and test
Code Block |
---|
|
docker build --build-arg TARGET_ARCHITECTURE="linux" --build-arg TARGETARCH="amd64" -t baltig.infn.it:4567/epics-containers/infn-epics-ioc:local ## build
|
For test refer to Integration and Standardization existing development (IBEK)