prjemian / epics-docker

Provide EPICS IOCs in docker images
9 stars 4 forks source link
hacktoberfest hacktoberfest2021

EPICS synApps in a Docker Image

Docker image prjemian/synapps providing EPICS base, synApps, and Area Detector software providing IOCs (servers) for development, simulation, testing, and training.

tag release image downloads
tag release image pulls

Contents

Quick start

Two steps: Area detector IOC with simulated camera

  1. Download and install iocmgr.sh (bash shell script for Linux).
  2. Run iocmgr.sh start adsim test1 to start ioctest1

That's it! You just started a custom version of the ADSimDetector IOC.

Next steps: Get an EPICS client to operate the IOC's controls and view the images it generates.

What this repository provides

Note: This repository does not provide EPICS client software.

How to use this image

Run custom XXX or ADSimDetector IOCs. Copy (download) the iocmgr.sh shell script to a directory on your executable path and make the script executable.

See the Quick Start section and iocmgr.sh for examples.

IOCs are created in docker containers. If you wish, the container's /tmp is available for read-only mount on the docker host computer. This table shows the same directory from the IOC or the host filesystem. Any files created in the container (such as by an area detector IOC) will be available as long as the container is running.

system filesystem
IOC /tmp
host /tmp/docker_ioc/iocPRE

Use the same docker image (prjemian/synapps:latest) for all IOCs. The iocmgr.sh script runs only one IOC per container. Starting containers is usually very fast.

Running an IOC in the container

Running an IOC in a container is usually a two-step process, similar to running an IOC in any computer.

  1. Start a container with the image (and any additional features such as network and volume provisioning). Use docker run ...
  2. Start the IOC in the container (usually with screen or procServ, so it runs in the background) Use docker exec ....

Details

Additional documentation is available.

custom synApps

Download iocmgr.sh (if not already installed)

These IOCs will use the GP IOC support.

cd ~/bin
wget https://raw.githubusercontent.com/prjemian/epics-docker/main/resources/iocmgr.sh
chmod +x iocmgr.sh

Run two separate GP IOCs with prefixes ocean: and sky:. (Do not specify the trailing :. The script will manage that for you.)

iocmgr.sh start GP ocean
iocmgr.sh start GP sky

custom Area Detector (ADSimDetector)

Download iocmgr.sh (if not already installed)

cd ~/bin
wget https://raw.githubusercontent.com/prjemian/epics-docker/main/resources/iocmgr.sh
chmod +x iocmgr.sh

Run two separate ADSIM IOCs with prefixes air: and land:. (Do not specify the trailing :. The script will manage that for you.)

iocmgr.sh start ADSIM air
iocmgr.sh start ADSIM land

Hint

You could create a new script to start all the IOCs you want. Here's an example which starts all four IOCs above:

#!/bin/bash

iocmgr.sh restart GP ocean
iocmgr.sh restart GP sky
iocmgr.sh restart ADSIM air
iocmgr.sh restart ADSIM oxy

IOCs Provided

Starter Scripts

script location comments
iocmgr.sh docker host User script to manage IOCs and GUIs
start_MEDM_PRE container /tmp Called by iocmgr.sh (start the MEDM GUI for PRE IOC)
start_caQtDM_PRE container /tmp Called by iocmgr.sh (start the caQtDM GUI for PRE IOC)
adsim.sh container /root/bin Starts the custom ADSimDetector IOC in the container.
gp.sh container /root/bin Starts the custom XXX IOC in the container.

Docker Image

The current docker image (prjemian/synapps:latest) is listed in the next table. A full list of related docker images is on a separate page.

release image docs notes
v2.0.0 prjemian/synApps docs Debian 11 Bullseye, EPICS base 7.0.5, synApps 6.2.1, AD 3.11 (all-in-one)

Authors

Acknowledgements