Run MoPad within a docker.
MoPad is a tool for graphical and numerical analysis of seismic moment tensors
by Lars Krieger and Sebastian Heimann
http://www.larskrieger.de/mopad/
https://github.com/geophysics/MoPaD
To obtain mopad docker image, you have two options:
Get the last built image from DockerHub repository:
docker pull ingv/mopad:latest
Clone the git repositry:
git clone https://github.com/INGV/mopad.git
cd mopad
build the image:
docker build --tag ingv/mopad .
in case of errors, try:
docker build --no-cache --pull --tag ingv/mopad .
Make a local volume (directory) for nginx cache:
mkdir /tmp/mopad_cache
run the container in daemon (-d
) mode:
docker run -d --name mopad_container --rm -v /tmp/mopad_cache:/var/cache -p 8383:80 ingv/mopad
Then test access to http://localhost:8383/.
Examples of URL:
- http://localhost:8383/cgi-bin/mopad.cgi?plot_arg=0,55,23
- http://localhost:8383/cgi-bin/mopad.cgi?plot_arg=-40.568,-24.033,64.601,125.752,-90.024,-7.461&color=0,255,0
- http://localhost:8383/cgi-bin/mopad.cgi?plot_arg=-63.828,-8.743,72.571,19.328,-12.439,-9.573&color=blue
Reminder: mopad plot mxx
,myy
,mzz
,mxy
,mxz
,myz
...
docker run --rm -it ingv/mopad ...mopad-arguments...
docker run --rm -it \
-e DISPLAY=${MYIP}:0 \
--mount type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix \
ingv/mopad \
$@
./runMoPadInDocker.sh plot 0,1,-1,0,0,0
docker run --rm ingv/mopad piped ...mopad-arguments... -f "docker_outfilename" > "host_outfilename"
N.B.: "docker_outfilename" must be the last argument.
Examples:
docker run --rm ingv/mopad piped plot 0,1,-1,0,0,0 -f tmp.svg > out.svg
docker run --rm ingv/mopad piped plot 0,1,-1,0,0,0 -f tmp.png > out.png
docker run --rm ingv/mopad "mopad plot 0,1,-1,0,0,0 -f tmp.png && cat tmp.png" > out.png
Thanks to your contributions!
Here is a list of users who already contributed to this repository:
(c) 2023 Matteo Quintiliani matteo.quintiliani[at]ingv.it
(c) 2023 Valentino Lauciani valentino.lauciani[at]ingv.it
Istituto Nazionale di Geofisica e Vulcanologia, Italia