Skip to content
Snippets Groups Projects
Commit 9692c78d authored by Roland Gaida's avatar Roland Gaida
Browse files

Updated to Geant4 v11.1.3

parent 0f4b1cbe
Branches main
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ Base image: Bitnami Minideb (Debian Bookworm) ...@@ -6,7 +6,7 @@ Base image: Bitnami Minideb (Debian Bookworm)
Included software: Included software:
* Geant4 v11.1.2 with Pybind and GEARS * Geant4 v11.1.3 with Pybind and GEARS
* Root v6.28.6 (includes PyRoot library) * Root v6.28.6 (includes PyRoot library)
* Python v3.11.2, Pip v23.0.1 * Python v3.11.2, Pip v23.0.1
...@@ -38,7 +38,7 @@ Make sure docker is installed and running on your platform. To make use of Geant ...@@ -38,7 +38,7 @@ Make sure docker is installed and running on your platform. To make use of Geant
If you prefer not to build a container image yourself, you can utilize the prebuilt image available in this repository. The image is about 5 GB in size. If you prefer not to build a container image yourself, you can utilize the prebuilt image available in this repository. The image is about 5 GB in size.
To do so, proceed directly to step 3 and replace `-t rgaida/geant4-docker` with `-t gitlab-registry.mpcdf.mpg.de/rgaida/geant4-docker`. To do so, proceed directly to step 3 and replace `-t geant4-docker` with `-t gitlab-registry.mpcdf.mpg.de/rgaida/geant4-docker`.
You can update the image at any time by pulling the latest version from the registry: You can update the image at any time by pulling the latest version from the registry:
...@@ -62,7 +62,7 @@ Execute the following command to download and compile Geant4 sources in a docker ...@@ -62,7 +62,7 @@ Execute the following command to download and compile Geant4 sources in a docker
docker build --build-arg TAG="v11.1.2" --build-arg MULTITHREADING="ON" --build-arg INCLUDE_GEARS="Y" --output=./binaries --target=artifacts -f Dockerfile_geant4 . docker build --build-arg TAG="v11.1.2" --build-arg MULTITHREADING="ON" --build-arg INCLUDE_GEARS="Y" --output=./binaries --target=artifacts -f Dockerfile_geant4 .
``` ```
This command will build Geant4 v11.1.2 with multithreading enabled (default) and additionally compiles the latest GEARS version (default). It exports the archived binaries to the `binaries` directory as `geant4-v11.1.2-mt-debian-bin.tar.gz` and `gears-latest-debian-bin.tar.gz` archives. This command will build Geant4 v11.1.2 with multithreading enabled and additionally compiles the latest GEARS version (default). It exports the archived binaries to the `binaries` directory as `geant4-v11.1.2-mt-debian-bin.tar.gz` and `gears-latest-debian-bin.tar.gz` archives.
You can change the TAG argument to build a different version of Geant4. The available tags can be found in the [Geant4 repository](https://gitlab.cern.ch/geant4/geant4/-/tags). The packages_geant4.txt file includes all packages that are required to build Geant4. If you want to add or remove packages, you need to edit this file. You can change the TAG argument to build a different version of Geant4. The available tags can be found in the [Geant4 repository](https://gitlab.cern.ch/geant4/geant4/-/tags). The packages_geant4.txt file includes all packages that are required to build Geant4. If you want to add or remove packages, you need to edit this file.
...@@ -91,7 +91,7 @@ Before proceeding with this step, make sure you have already compiled Geant4 and ...@@ -91,7 +91,7 @@ Before proceeding with this step, make sure you have already compiled Geant4 and
Execute the command below to actually build the docker image. Please note, this step only needs to be completed once, provided the contents of the `Dockerfile` remain unaltered and as long as no new Geant4 or ROOT binaries are required. Execute the command below to actually build the docker image. Please note, this step only needs to be completed once, provided the contents of the `Dockerfile` remain unaltered and as long as no new Geant4 or ROOT binaries are required.
```bash ```bash
docker build --pull --rm --build-arg GEANT4_VERSION="v11.1.2" --build-arg ROOT_VERSION="v6.28.06" -f Dockerfile -t rgaida/geant4-docker . docker build --pull --rm --build-arg GEANT4_VERSION="v11.1.2" --build-arg ROOT_VERSION="v6.28.06" -f Dockerfile -t geant4-docker .
``` ```
### 3 - Run the container image ### 3 - Run the container image
...@@ -105,17 +105,17 @@ Option 1 (X server) ...@@ -105,17 +105,17 @@ Option 1 (X server)
If you're running Linux or Windows with an X server installed, launch the container using the following command (replace `<mylocalworkspace>` with a valid local directory - this is where your data will persist): If you're running Linux or Windows with an X server installed, launch the container using the following command (replace `<mylocalworkspace>` with a valid local directory - this is where your data will persist):
```bash ```bash
docker run -it --rm --name geant4 -h container -e DISPLAY=host.docker.internal:0.0 -v <mylocalworkspace>:/var/geant4/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -t rgaida/geant4-docker docker run -it --rm --name geant4 -h container -e DISPLAY=host.docker.internal:0.0 -v <mylocalworkspace>:/var/geant4/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -t geant4-docker
``` ```
> This command runs a Docker container named `geant4` based on the image `rgaida/geant4-docker`, and mounts the `<mylocalworkspace>` directory as a volume in the container. It sets the hostname of the container to "container", and sets the `DISPLAY` environment variable to `host.docker.internal:0.0` to allow the container to connect to the host machine's X server. The `-it` and `--rm` options are used to run the container in interactive mode, remove the container when it is stopped, and allocate a pseudo-TTY respectively. The `-v` option is used to mount the `/tmp/.X11-unix` directory on the host machine to the same directory in the container, which allows the container to access the host machine's X server. > This command runs a Docker container named `geant4` based on the image `geant4-docker`, and mounts the `<mylocalworkspace>` directory as a volume in the container. It sets the hostname of the container to "container", and sets the `DISPLAY` environment variable to `host.docker.internal:0.0` to allow the container to connect to the host machine's X server. The `-it` and `--rm` options are used to run the container in interactive mode, remove the container when it is stopped, and allocate a pseudo-TTY respectively. The `-v` option is used to mount the `/tmp/.X11-unix` directory on the host machine to the same directory in the container, which allows the container to access the host machine's X server.
Option 2 (WSLg) Option 2 (WSLg)
If you're running Windows with WSL and WSLg installed, launch the container using the following command (replace `<mylocalworkspace>` with a valid local directory - this is where your data will persist): If you're running Windows with WSL and WSLg installed, launch the container using the following command (replace `<mylocalworkspace>` with a valid local directory - this is where your data will persist):
```bash ```bash
docker run -it --rm --name geant4 -h container -e DISPLAY=:0 -v <mylocalworkspace>:/var/geant4/workspace -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /run/desktop/mnt/host/wslg:/mnt/wslg -t rgaida/geant4-docker docker run -it --rm --name geant4 -h container -e DISPLAY=:0 -v <mylocalworkspace>:/var/geant4/workspace -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /run/desktop/mnt/host/wslg:/mnt/wslg -t geant4-docker
``` ```
> This command is similar to the one above, but sets the `DISPLAY` environment variable to `:0` to allow the container to connect to the host machine's X server. The `-v` option is used to mount the `/run/desktop/mnt/host/wslg` directory on the host machine to the same directory in the container, which allows the container to access the host machine's X server. > This command is similar to the one above, but sets the `DISPLAY` environment variable to `:0` to allow the container to connect to the host machine's X server. The `-v` option is used to mount the `/run/desktop/mnt/host/wslg` directory on the host machine to the same directory in the container, which allows the container to access the host machine's X server.
...@@ -131,13 +131,13 @@ The `docker run` command has only to be executed once(!) after each image update ...@@ -131,13 +131,13 @@ The `docker run` command has only to be executed once(!) after each image update
Option 1 (X server) Option 1 (X server)
```bash ```bash
docker run -it --name geant4 -h container -e DISPLAY=host.docker.internal:0.0 -v <mylocalworkspace>:/var/geant4/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -t rgaida/geant4-docker docker run -it --name geant4 -h container -e DISPLAY=host.docker.internal:0.0 -v <mylocalworkspace>:/var/geant4/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -t geant4-docker
``` ```
Option 2 (WSLg) Option 2 (WSLg)
```bash ```bash
docker run -it --name geant4 -h container -e DISPLAY=:0 -v <mylocalworkspace>:/var/geant4/workspace -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /run/desktop/mnt/host/wslg:/mnt/wslg -t rgaida/geant4-docker docker run -it --name geant4 -h container -e DISPLAY=:0 -v <mylocalworkspace>:/var/geant4/workspace -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /run/desktop/mnt/host/wslg:/mnt/wslg -t geant4-docker
``` ```
To start the container again, use `docker start -i geant4`. To start the container again, use `docker start -i geant4`.
...@@ -233,13 +233,13 @@ docker volume create geant4-pyenv ...@@ -233,13 +233,13 @@ docker volume create geant4-pyenv
You need to mount the created volume to `/opt/pyenv`. Add `-v geant4-pyenv:/opt/pyenv` to the docker run command: You need to mount the created volume to `/opt/pyenv`. Add `-v geant4-pyenv:/opt/pyenv` to the docker run command:
```bash ```bash
docker run -it --rm -h container -e DISPLAY=host.docker.internal:0.0 -v <mylocalworkspace>:/var/geant4/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -v geant4-pyenv:/opt/pyenv -t rgaida/geant4-docker docker run -it --rm -h container -e DISPLAY=host.docker.internal:0.0 -v <mylocalworkspace>:/var/geant4/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -v geant4-pyenv:/opt/pyenv -t geant4-docker
``` ```
or (WSLg) or (WSLg)
```bash ```bash
docker run -it --rm -h container -e DISPLAY=:0 -v <mylocalworkspace>:/var/geant4/workspace -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /run/desktop/mnt/host/wslg:/mnt/wslg -v geant4-pyenv:/opt/pyenv -t rgaida/geant4-docker docker run -it --rm -h container -e DISPLAY=:0 -v <mylocalworkspace>:/var/geant4/workspace -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /run/desktop/mnt/host/wslg:/mnt/wslg -v geant4-pyenv:/opt/pyenv -t geant4-docker
``` ```
respectively. respectively.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment