Coder Social home page Coder Social logo

jesusvasquez333 / smurf-matlab-ioc Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 16.84 MB

SLAC's Matlab support IOC Docker image for the SMuRF project

License: Other

Dockerfile 7.91% Shell 3.15% Makefile 34.98% Batchfile 37.25% HTML 13.04% C++ 3.66%

smurf-matlab-ioc's Introduction

SLAC's Matlab support IOC Docker image for the SMuRF project

Description

This docker image, named smurf-matlab-ioc contains the SLAC's Matlab support IOC.

It is based on centos 6.10, and the IOC application is build using the smurf-epics-slac image, which contains all the SLAC's packages, EPICS base, and EPICS modules need to build this IOC.

The name of the IOC used in this project is sioc-smrf-ml00.

Source code

The IOC source code was taken from SLAC's version, hosted in an internal CVS repository.

The code was manually checkout from CVS (tagged version MatlabSupport-R4-2-3), cleaned (removed references to CVS, cram, and SLAC's IOCs), and copied into this repository.

Building the image

The provided script build_docker.sh will automatically build the docker image. It will tag the resulting image using the same git tag string (as returned by git describe --tags --always).

Running the container

As any IOC at SLAC, this IOC need to a data directory where it will read and write its configuration setting (like for example autosave, iocAdmin, etc.). Inside the container, this IOC data directory is located in

/data/epics/ioc/data/sioc-smrf-ml00

You should have this directory in your host CPU, and map it to /data/ inside the container.

You also need to publish the EPIC channel access ports (tcp and udp ports 5064, 5065 by default) to the host if you want external clients to have access to the IOC's PVs. (Note: Other containers running in the same host will have access to these ports even if they are not published to the host).

When the container is started, by default the IOC is started inside it.

The container can be run in two ways: in the foreground or in the background.

Run the container in the foreground

You can start the container in the foreground with this command

docker run -ti --rm --name smurf-matlab-ioc \
-v <LOCAL_DATA_PATH>:/data \
-p 5064:5064 -p 5065:5065 -p 5064:5064/udp -p 5065:5065/udp \
jesusvasquez333/smurf-matlab-ioc:<VERSION>

Where:

  • <LOCAL_DATA_PATH>: is the absolute path of the root of the IOC data directory in the host local disk. For example, if in the host this directory is /data/epics/ioc/data/sioc-smrf-ml00, then <LOCAL_DATA_PATH> = /data By default the container will start the IOC.
  • : is the tagged version of the container your want to run.

Run the container in the background

You can start the container in the background with this command

docker run -tid --rm --name smurf-matlab-ioc \
-v <LOCAL_DATA_PATH>:/data \
-p 5064:5064 -p 5065:5065 -p 5064:5064/udp -p 5065:5065/udp \
jesusvasquez333/smurf-matlab-ioc:<VERSION>

Where the parameters are the same explained in the previous case.

Checking the status of the container

You can check the status of running containers with the docker ps command. It will list the containers that are running at the moment.

$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
163326dec993        smurf-matlab-ioc    "./st.cmd"          31 seconds ago      Up 30 seconds                           awesome_raman

Attaching to the container running in the background

You can attached to the container with the command docker attach matlab_ioc. And you can detach again pressing CRTL+p followed by CRTL+q.

Stop and container

You can stop the container with the command docker stop smurf-matlab-ioc.

smurf-matlab-ioc's People

Contributors

jesusvasquez333 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.