Skip to content

Dockerized build of Geopsy package software for reproducible environments. Includes multi-stage build with optimization and GPU support. Based on Ubuntu 24.04.

License

Notifications You must be signed in to change notification settings

AngelVeraHerrera/GeopsyPack-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker MIT License

GeopsyPack-Docker

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


📖 About This Repository

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 (builderoptimizerruntime)
  • ✅ 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

(back to top)


⚙️ GPU Configuration

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.

Ubuntu (with NVIDIA GPU)

  1. 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.

  2. 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
    
  3. 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

(back to top)


🛠️ Build Instructions

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 .

(back to top)


🚀 Run In Ubuntu

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_Shared

GUI + GPU Mode (Recommended)

Allow 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 geopsy

GUI + CPU Mode (No GPU)

If 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 geopsy

Accessing the Container Shell

To explore the environment or debug:

docker run -it --rm geopsypack:3.5.2 bash

(back to top)


🚀 Run In macOS

It 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_Shared

GUI + CPU Mode (No GPU)

Since macOS does not support GPU passthrough to Docker, you must use CPU-only mode with XQuartz for GUI support.

  1. Install XQuartz
    Download and install from https://www.xquartz.org

  2. Enable network clients
    In XQuartz, go to Preferences → Security and enable:
    Allow connections from network clients

    Restart XQuartz after enabling this option.

  3. 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
  4. 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

Accessing the Container Shell

To explore the environment or debug:

docker run -it --rm geopsypack:3.5.2 bash

(back to top)


License

Distributed under the MIT License. See the full text in the LICENSE file for more information.

(back to top)


Acknowledgments

(back to top)


About

Dockerized build of Geopsy package software for reproducible environments. Includes multi-stage build with optimization and GPU support. Based on Ubuntu 24.04.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published