Run gprMax models in a Docker container.
- Install and run gprMax models easily on Windows, Mac OS, and Linux.
- Ideal for deployments to containerised web services like Amazon ECS.
Install Docker
Clone this repository
git clone https://github.com/lomcin/docker-gprmax.git
and navigate to the repository on your system
cd docker-gprmax
This repository contains an example model, model.in which simulates the response of a Hertzian dipole over a half-space containing a metal cylinder.
To run the model enter the following command in a Terminal (Linux/Mac OS) or Windows PowerShell (Windows):
docker run -v ${PWD}:/app maggi10/gprmax:latest model.ingprMax will now run inside a docker container. The simulation output files will be saved in the current directory.
.
├── Dockerfile
├── README.md
├── cylinder_half_space.vti
├── model.in
├── model.out
└── requirements.txt
Different models can be run by copying the .in file into the current directory, running the above command and replacing model.in with the name of the new model. For example, the command for a new model my_new_model.in is:
docker run -v ${PWD}:/app maggi10/gprmax:latest my_new_model.inThe command has 3 actions:
- Pull the maggi10/gprmax image from Docker Hub (if it's the first time the command has been run).
- Mount the local directory in the Docker container under /app.
- Run gprMax on the maggi10/gprmax image in a container with the specified parameters.
The container can be run from anywhere on your system. i.e. you do not need the Dockerfile. Just make sure you have a model file in the same directory as you're running the container.
standard gprMax parameters can be added to the end of above command. For example, the geometry of the simulation can be tested without running gprMax by running
docker run -v ${PWD}:/app maggi10/gprmax:latest model.in --geometry-onlyIn this case the only output is the geometry file cylinder_half_space.vti
.
├── Dockerfile
├── README.md
├── cylinder_half_space.vti
├── model.in
└── requirements.txt
Currently the docker image is pulled from Docker Hub. To rebuild the image run.
docker build -t dockergprmax:latest .
Run new image:
docker run -v ${PWD}:/app dockergprmax:latest model.inIf you use gprMax and publish your work we would be grateful if you could cite our work using:
Warren, C., Giannopoulos, A., & Giannakis I. (2016). gprMax: Open source software to simulate electromagnetic wave propagation for Ground Penetrating Radar, Computer Physics Communications (http://dx.doi.org/10.1016/j.cpc.2016.08.020)