Dockerized build of Geopsy package software for reproducible environments.
Includes multi-stage build with optimization and GPU support. Based on Ubuntu 24.04.
Geopsy Project
·
Report Bug
·
Request Feature
Geopsy Project is an open source suite of geophysical analysis tools. You can learn about the project in the Geopsy Project website.
This repository provides a Dockerfile to build and run the Geopsy package in an optimized container, with optional GPU and X11 forwarding.
- ✅ Multi-stage build (
builder→optimizer→runtime) - ✅ Small optimized runtime image based on Ubuntu 24.04.
- ✅ Tested on Ubuntu 24.04, macOS and Windows 10/11.
- ✅ X11 forwarding for GUI
- ✅ GPU support
This Docker image supports GPU acceleration using NVIDIA drivers and CUDA. The setup depends on your operating system. If you don't want to use native GPU acceleration, you can skip this section and go directly to Build Instructions.
-
Install the official NVIDIA drivers.
⚠️ Installing older NVIDIA drivers (e.g., 470.xx) on modern systems like Ubuntu 24.04 may require older kernels. If you need help with this, please contact us. -
Install NVIDIA Container Toolkit (for GPU support in Docker):
# Add NVIDIA GPG key curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \ sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg # Add NVIDIA Container Toolkit repository distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list # Install toolkit sudo apt-get update sudo apt-get install -y nvidia-container-toolkit # Configure Docker runtime sudo nvidia-ctk runtime configure --runtime=docker # Restart Docker sudo systemctl restart docker
-
Test GPU support inside Docker. If everything is set up correctly, you should see the output of nvidia-smi with your GPU details.
docker run --rm --gpus all nvidia/cuda:12.2.0-base-ubuntu22.04 nvidia-smi
Inside the folder with the Geopsy package version that you want (for example 3.5.2), build the Docker image. Remember to modify the version number.
Building the image is demanding and will take time depending on your computer's resources. It may take more than half an hour on older computers.
If you don’t need a proxy, just run:
docker build -t geopsypack:3.5.2 .If you are behind a proxy, pass the arguments during build:
docker build \
--build-arg HTTP_PROXY=http://HOST:PORT \
--build-arg HTTPS_PROXY=http://HOST:PORT \
--build-arg NO_PROXY=localhost,127.0.0.1,::1 \
-t geopsypack:3.5.2 .It is recommended work with a shared folder with your host. You can prepare a shared folder and then pass to the docker image using the "-v" command.
mkdir /home/<username>/Workspace/GeopsyPack_SharedAllow local connections to the X11 display and run Geopsy with GPU support and the shared host directory:
xhost +local:docker
docker run -it --rm \
--gpus all \
-e DISPLAY=$DISPLAY \
-e XDG_RUNTIME_DIR=/tmp/runtime-geopsy \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v /home/<username>/Workspace/GeopsyPack_Shared:/home/geopsy/GeopsyPack_Shared \
geopsypack:3.5.2 geopsyIf you don’t have GPU support or drivers installed:
xhost +local:docker
docker run -it --rm \
-e DISPLAY=$DISPLAY \
-e XDG_RUNTIME_DIR=/tmp/runtime-geopsy \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v /home/<username>/Workspace/GeopsyPack_Shared:/home/geopsy/GeopsyPack_Shared \
geopsypack:3.5.2 geopsyTo explore the environment or debug:
docker run -it --rm geopsypack:3.5.2 bashIt is recommended to work with a shared folder with your host. You can prepare a shared folder and then pass it to the docker image using the "-v" command.
mkdir -p /Users/<username>/Workspace/GeopsyPack_SharedSince macOS does not support GPU passthrough to Docker, you must use CPU-only mode with XQuartz for GUI support.
-
Install XQuartz
Download and install from https://www.xquartz.org -
Enable network clients
In XQuartz, go to Preferences → Security and enable:
✅ Allow connections from network clientsRestart XQuartz after enabling this option.
-
Configure DISPLAY and allow Docker access
Run in your terminal:MYIP="$(ifconfig | grep -w inet | egrep -v -w "127.0.0.1" | awk '{print $2}' | head -n 1)" xhost +${MYIP} || exit
-
Run Geopsy with GUI (CPU only)
docker run -it --rm \ -e DISPLAY=${MYIP}:0 \ --mount type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix \ -v /Users/<username>/Workspace/GeopsyPack_Shared:/home/geopsy/GeopsyPack_Shared \ geopsypack:3.5.2 geopsy
To explore the environment or debug:
docker run -it --rm geopsypack:3.5.2 bashDistributed under the MIT License. See the full text in the LICENSE file for more information.
- Geopsy Project
- Royal Institute and Observatory of the Spanish Navy (San Fernando, Spain)
- MIT License – reference for open licensing.
- Shields
- Best-README-Template