Difference between revisions of "Solid container"
From Hall A Wiki
(New page: (testing as 2018/03) = introduction = jlab ifarm and farm support singularity container. Users can run docker or singularity container on any local machines. singularity can load docke...) |
|||
Line 17: | Line 17: | ||
location on web, http://www.phy.duke.edu/~zz81/package/jlabsolidapps-test.simg with md5 e41378641735ce5ae15e74d77526a248 | location on web, http://www.phy.duke.edu/~zz81/package/jlabsolidapps-test.simg with md5 e41378641735ce5ae15e74d77526a248 | ||
− | ''' | + | '''load it with singularity anywhere''' |
setenv image_FULL_PATH (/group/solid/apps on ifarm or where you have it on local machine) | setenv image_FULL_PATH (/group/solid/apps on ifarm or where you have it on local machine) | ||
setenv $solid_repo_FULL_PATH (/group/solid/solid_svn on ifarm or where you have it on your local machine) | setenv $solid_repo_FULL_PATH (/group/solid/solid_svn on ifarm or where you have it on your local machine) | ||
module load singularity-2.4.2 | module load singularity-2.4.2 | ||
− | cd your_work_dir | + | cd your_work_dir |
singularity shell --bind $solid_repo_FULL_PATH:/solid_svn $image_FULL_PATH/jlabsolidapps-test.simg | singularity shell --bind $solid_repo_FULL_PATH:/solid_svn $image_FULL_PATH/jlabsolidapps-test.simg | ||
+ | (you are running as yourself in container, not as root) | ||
+ | (both your_work_dir and dir $solid_repo_FULL_PATH at host are mounted in container) | ||
+ | |||
+ | '''load it with docker on your local machine by using your local machine's Xwindows''' | ||
+ | setenv $solid_repo_FULL_PATH (where you have it on your local machine) | ||
+ | sudo docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ${HOME}:/home/${USER} -v $solid_repo_FULL_PATH:/solid_svn --ipc=host jlabsolid/jlabsolidapps:test | ||
+ | (you are running as root in container) | ||
+ | (both your home dir and $solid_repo_FULL_PATH dir are mounted in container) | ||
+ | |||
+ | '''load it with docker on your local machine by container's Xwindows''' | ||
+ | install [https://github.com/mviereck/x11docker x11docker] by source and xephyr by yum | ||
+ | x11docker --desktop --homedir ${HOME} -v $solid_repo_FULL_PATH:/solid_svn jlabsolid/jlabsolidapps:test fluxbox | ||
+ | right click on the fluxbox window and open xterm | ||
+ | (you are running as yourself in container, not as root) | ||
+ | (both your home dir and $solid_repo_FULL_PATH dir are mounted in container) | ||
+ | |||
+ | '''run GEMC inside container''' | ||
env -i tcsh | env -i tcsh | ||
source /jlabsolidapps/JLAB_ROOT/setup | source /jlabsolidapps/JLAB_ROOT/setup | ||
Line 33: | Line 50: | ||
exit or ctrl-c (leave container) | exit or ctrl-c (leave container) | ||
− | + | '''How to use container to run jlab farm job''' | |
− | + | ||
− | + | ||
− | + | ||
− | '''How to use | + | |
examples are at /work/halla/solid/sim/solid_gemc/PVDIS_LD2_JLAB_VERSION_1.3/pass6 | examples are at /work/halla/solid/sim/solid_gemc/PVDIS_LD2_JLAB_VERSION_1.3/pass6 |
Revision as of 15:44, 5 March 2018
(testing as 2018/03)
introduction
jlab ifarm and farm support singularity container. Users can run docker or singularity container on any local machines. singularity can load docker image.
A docker image is made for solid. This could be a standard way to run solid software on any machine for consistent result without need for installation.
Read Note_about_container for any general things using container
how to use it
get image sudo docker pull jlabsolid/jlabsolidapps:test sudo singularity pull docker://jlabsolid/jlabsolidapps:test location on ifarm, /group/solid/apps/jlabsolidapps-test.simg (build by singularity-2.4.2 pull from docker location on web, http://www.phy.duke.edu/~zz81/package/jlabsolidapps-test.simg with md5 e41378641735ce5ae15e74d77526a248
load it with singularity anywhere setenv image_FULL_PATH (/group/solid/apps on ifarm or where you have it on local machine) setenv $solid_repo_FULL_PATH (/group/solid/solid_svn on ifarm or where you have it on your local machine) module load singularity-2.4.2 cd your_work_dir singularity shell --bind $solid_repo_FULL_PATH:/solid_svn $image_FULL_PATH/jlabsolidapps-test.simg (you are running as yourself in container, not as root) (both your_work_dir and dir $solid_repo_FULL_PATH at host are mounted in container)
load it with docker on your local machine by using your local machine's Xwindows setenv $solid_repo_FULL_PATH (where you have it on your local machine) sudo docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ${HOME}:/home/${USER} -v $solid_repo_FULL_PATH:/solid_svn --ipc=host jlabsolid/jlabsolidapps:test (you are running as root in container) (both your home dir and $solid_repo_FULL_PATH dir are mounted in container)
load it with docker on your local machine by container's Xwindows install x11docker by source and xephyr by yum x11docker --desktop --homedir ${HOME} -v $solid_repo_FULL_PATH:/solid_svn jlabsolid/jlabsolidapps:test fluxbox right click on the fluxbox window and open xterm (you are running as yourself in container, not as root) (both your home dir and $solid_repo_FULL_PATH dir are mounted in container)
run GEMC inside container env -i tcsh source /jlabsolidapps/JLAB_ROOT/setup setenv LD_LIBRARY_PATH ${GEMC}/source:${LD_LIBRARY_PATH} setenv SoLID_GEMC /solid_svn/solid_gemc2 setenv PATH ${SoLID_GEMC}/source/${GEMC_VERSION}:${PATH} cd $SoLID_GEMC/script solid_gemc solid_SIDIS_He3_full.gcard -USE_GUI=0 (batch mode) (not working on ifarm yet) solid_gemc solid_SIDIS_He3_full.gcard (graphic mode) exit or ctrl-c (leave container)
How to use container to run jlab farm job examples are at /work/halla/solid/sim/solid_gemc/PVDIS_LD2_JLAB_VERSION_1.3/pass6