User Tools

Site Tools


cn:csn5:isolpharm_ag:computing:geant4_docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
cn:csn5:isolpharm_ag:computing:geant4_docker [2018/11/07 09:50] – [Procedure] bagli@infn.itcn:csn5:isolpharm_ag:computing:geant4_docker [2018/11/07 09:50] (current) – [Procedure] bagli@infn.it
Line 1: Line 1:
 +====== Geant4 Docker Image Isolpharm_Ag ======
 +===== Create the Image =====
 +==== Prerequisites ====
 +  * [[https://www.docker.com|Docker]]
 +  * [[https://git-scm.com|Git]]
 +  * [[https://www.geant4.org|Geant4 (10.3.X)]]
  
 +==== Procedure ====
 +Clone from GitHub the repository of the Geant4 code for the application and the docker image
 +
 +<code>git clone https://github.com/ebagli/G4_ISOL_RELEASE.git</code>
 +
 +<code>git clone https://github.com/andreadotti/docker-geant4.git</code>
 +
 +Enter the directory ''applications'' in the ''docker-geant4'' cloned repository
 +
 +<code>cd docker-geant4/applications</code>
 +
 +Substitute the ''runme.sh'' file in the ''docker-geant4/applications'' with the ''runme.sh'' of the ''G4_ISOL_RELEASE'' cloned repository.
 +
 +<code>cp ../../G4_ISOL_RELEASE/runme.sh .</code>
 +
 +Build the binaries of the application
 +
 +<code>./build-binaries.sh [Geant4_data_abs_dir] [G4_ISOL_RELEASE_abs_dir] andreadotti/geant4-dev:10.3.p02</code>
 +
 +where the ''[Geant4_data_abs_dir]'' is the directory where the data downloaded from the [[https://www.geant4.org|Geant4 website]] is stored.
 +The ''[G4_ISOL_RELEASE_abs_dir]'' is the directory where the [[https://github.com/ebagli/G4_ISOL_RELEASE.git|G4_ISOL_RELEASE application]] is stored.
 +
 +Build the image
 +
 +<code>./build-image.sh -y andreadotti/geant4:10.3.p02-data ebagli/isolpharm</code>
 +
 +Tag the image
 +
 +<code>docker tag ebagli/isolpharm ebagli/isolpharm:latest</code>
 +
 +Push on Docker repositories
 +
 +<code>docker push ebagli/isolpharm:latest</code>
 +
 +===== Use the Image =====
 +Pull the Docker image from the online repositories
 +
 +<code>docker pull ebagli/isolpharm</code>
 +
 +Run the Docker image
 +
 +<code>docker run -v [output_abs_dir_on_host]:/output:rw -v [macro_abs_dir_on_host]:/macros/ ebagli/isolpharm /runme.sh [macro_file_name] [--primaries]</code>
 +
 +where ''[output_abs_dir_on_host]'' is the directory where the output data will be stored and ''[macro_abs_dir_on_host]'' is the directory where the macros are stored. The ''[--primaries]'' flag is used to enable the generation of the primaries.
 +
 +===== Close the Docker containers =====
 +
 +List all the containers
 +
 +<code>docker ps -a</code>
 +
 +Stop all the running containers
 +
 +<code>docker stop $(docker ps -a -q)</code>
 +
 +Delete all the stopped containers
 +
 +<code>docker rm $(docker ps -a -q)</code>
cn/csn5/isolpharm_ag/computing/geant4_docker.txt · Last modified: 2018/11/07 09:50 by bagli@infn.it

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki