Sign inSign up

artemisbeta/geant4

By artemisbeta

•Updated 7 months ago

An image for Geant4 using Ubuntu Latest

Image
Languages & frameworks
0

3.7K

artemisbeta/geant4 repository overview

⁠Geant4 Docker

This image contains a pre-built version of Geant4⁠, the latest containing v11.4.0 with environment variables set for connecting to the datasets. The examples included with the framework, which can be found using the environment variable $G4CPPEXAMPLES, can be built by creating a directory in the user area and running:

g4_cmake $G4CPPEXAMPLES/path/to/example
make -j8

Also included within the .bashrc is a new alias g4_gen_cmake_list which creates a very basic CMakeLists.txt file so you can build other basic G4 projects.

⁠Running

If X11 is not required the image can be launched with the minimal options:

docker run -ti artemisbeta/geant4

⁠X11 Unix

Run the image in the following way to ensure X11 support for visualization:

docker run -i -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -t artemisbeta/geant4

⁠Wayland

For Wayland based Linux, such as newer Ubuntu distributions:

docker run -it --rm \
    -e DISPLAY=$DISPLAY \
    -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
    -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY \
    --network host \
    --device /dev/dri \
    artemisbeta/geant4

⁠X11 Windows

For Windows it is recommended that you use Git Bash as your terminal, and you will need to install vcxsrv using the Chocolatey package manager:

choco install vcxsrv

After installation run the "XLaunch" application to create a configuration file which should be saved into %appdata%\Xming. This configuration should have the Disable access control checkbox ticked. Use ipconfig to find the IP of your local machine, then run:

export DISPLAY=<IP>:0.0

docker run -i -e DISPLAY=$DISPLAY -t artemisbeta/geant4

⁠Geant4Py

g4Py is available within tag release 10.3.1 and 11.0.2 of this image (build changes have prevented it working in later tags which currently contain only the Geant4 module) To test run: python -c "import Geant4" or try one of the examples listed under the new environment variable $G4PYTHONEXAMPLES. For 10.3.1 the g4py module is also available.

⁠DAWN Installed

The Drawer for Academic WritiNgs has been installed onto the container, to view a .prim geometry: dawn <geometry>.prim

⁠Versions

tagGeant4 VersionUbuntu Version
latest11.4.025.04.0
11.4.011.4.025.04.0
11.3.211.3.225.04.0
11.3.011.3.024.10.0
11.1,211.1.224.04.0
11.1.111.1.122.04.2
11.0.211.0.222.04.2
10.7.210.7.220.04.2
10.6.210.6.220.04.1
10.3.110.3.116.04.2

Tag summary

Content type

Image

Digest

sha256:383bb9a41…

Size

5.5 GB

Last updated

7 months ago

docker pull artemisbeta/geant4