Install directions

Build EPICS base

Warning

Make sure the disk partition hosting ~/epics is not larger than 2 TB. See tech talk and Diamond Data Storage document.

$ mkdir ~/epics
$ cd epics

Build a minimal synApps

To build a minimal synApp:

$ cd ~/epics
  • Download in ~/epics assemble_synApps.sh

  • Edit the assemble_synApps.sh script as follows:
    1. Set FULL_CLONE=True

    2. Set EPICS_BASE to point to the location of EPICS base. This could be on APSshare (the default), or a local version you built.

    For scanlib you need

    1. ASYN=R4-37

    2. AUTOSAVE=R5-10

    3. BUSY=R1-7-2

    4. XXX=R6-1

    You can comment out all of the other modules (ALLENBRADLEY, ALIVE, etc.)

  • Run:

    $ assemble_synApps.sh
    
  • This will create a synApps/support directory:

    $ cd synApps/support/
    
  • Edit asyn-RX-YY/configure/RELEASE to comment out the lines starting with:

    IPAC=$(SUPPORT)/
    SNCSEQ=$(SUPPORT)/
    

Warning

If building for RedHat8 uncomment TIRPC=YES in asyn-RX-YY/configure/CONFIG_SITE

  • Clone the scanlib module into synApps/support:

    $ git clone https://github.com/tomography/scanlib.git
    
  • Edit configure/RELEASE add this line to the end:

    SCANLIB=$(SUPPORT)/scanlib
    
  • Edit Makefile add this line to the end of the MODULE_LIST:

    MODULE_LIST += SCANLIB
    
  • Run the following commands:

    $ make release
    $ make -sj
    

Build the python server

To build the scanLib python server you need to have Conda installed.

Next, create a dedicated conda environment for scanLib by running:

(base) $ conda create --name scanlib python=3.9

then:

(base) $ conda activate scanlib

and install the required python packages:

(scanlib) $ pip install pvapy
(scanlib) $ pip install pyepics

Finally you can build scanLib with:

(scanlib) $ cd ~/epics/synApps/support/scanLib/
(scanlib) $ python setup.py install

To run the python server:

(scanlib) $ python -i start_scanlib.py