简体中文文档: README_zh.md
Docker packaging for official gprMax releases and development snapshots, with separate CPU and NVIDIA GPU images.
The default release source is the official v.3.1.7 GitHub tag. That tag currently reports v3.1.6 in the gprMax runtime banner/egg metadata, so the Docker image tag tracks the upstream release tag rather than the internal banner string. The container keeps the release source tree, including user_models and tools.
Published image name:
ghcr.io/sethome2/gprmax-dockerTags:
3.1.7-cpu3.1.7-gpulatest-cpulatest-gpudevel-cpudevel-gpu
The devel-* tags are unstable snapshots of the upstream gprMax devel branch. The workflow checks for a new upstream commit once a month.
For the CPU version, a locally built image may perform better because gprMax is compiled for your host CPU.
The containers default to python3 -m gprMax "$@", with /work as the working directory. Without a bind mount, /work/user_models, /work/tools, and /work/user_libs point to the packaged release resources under /opt/gprMax.
Run a model from the release source tree:
docker run --rm ghcr.io/sethome2/gprmax-docker:3.1.7-cpu user_models/cylinder_Ascan_2D.inRun your own models by mounting a directory:
docker run --rm -v "$PWD":/work ghcr.io/sethome2/gprmax-docker:3.1.7-cpu model.inArguments after the image name are passed directly to gprMax. For example, this is equivalent to python -m gprMax cylinder_Bscan_GSSI_1500.in -n 54:
docker run --rm -v "$PWD":/work ghcr.io/sethome2/gprmax-docker:3.1.7-cpu cylinder_Bscan_GSSI_1500.in -n 54GPU run:
docker run --rm --gpus all -v "$PWD":/work ghcr.io/sethome2/gprmax-docker:3.1.7-gpu model.in -gpuThe GPU image requires a working NVIDIA driver and NVIDIA Container Toolkit on the host. The image includes CUDA Toolkit components because gprMax uses PyCUDA to compile CUDA kernels at runtime.
Run helper modules by overriding the entrypoint:
docker run --rm -v "$PWD":/work --entrypoint python3 ghcr.io/sethome2/gprmax-docker:3.1.7-cpu -m tools.plot_Ascan file.outCPU/noGPU image:
docker build -f Dockerfile.cpu -t gprmax:3.1.7-cpu .GPU image:
docker build -f Dockerfile.gpu -t gprmax:3.1.7-gpu .Override the packaged gprMax release:
docker build \
-f Dockerfile.cpu \
--build-arg GPRMAX_VERSION=3.1.7 \
--build-arg GPRMAX_TAG=v.3.1.7 \
-t gprmax:3.1.7-cpu .CPU:
docker run --rm gprmax:3.1.7-cpu --help
docker run --rm gprmax:3.1.7-cpu user_models/cylinder_Ascan_2D.inGPU, after host GPU runtime is working:
docker run --rm --gpus all gprmax:3.1.7-gpu --help
docker run --rm --gpus all gprmax:3.1.7-gpu user_models/cylinder_Ascan_2D.in -gpuThe GitHub Actions workflows build and publish CPU/GPU images to GHCR on pushes to main, tags, and manual dispatches. The devel workflow also checks upstream monthly and rebuilds only when its commit changes. CPU gets a --help smoke test in CI. GPU is build/push only because GitHub-hosted runners do not provide NVIDIA GPUs.
This repository packages official gprMax releases and unmodified devel snapshots. It does not fork or patch gprMax source code. A dedicated MPI image variant is intentionally left for the future.