Difference between revisions of "Solid container"

From Hall A Wiki
Jump to: navigation, search
Line 53: Line 53:
 
  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
  
= how to make solid container =
+
= how to make it it =
 +
 
 +
The SoLID docker container images are at store at docker store with account jlabsolid
 +
https://store.docker.com/profiles/jlabsolid
 +
 
 +
They are in 3 layers:
 +
1. jlabsolidbase include a centos base images with some necessary rpms;
 +
2. jlabsolidapps add various applications above jlabsolidbase;
 +
3. jlabsolid add implementation of SoLID simulation,reconstruction,analysis above jlabsolidapps to complete solid software release
 +
 
 +
The test images are
 +
jlabsolidbase:test is auto built on docker cloud from [https://github.com/jlabsolid/container/blob/master/Dockerfile_jlabsolidbase_test this Dockerfile]
 +
jlabsolidapps:test is based on jlabsolidbase:test and build manually by adding jlab framework 1.3 [https://eic.jlab.org/wiki/index.php/Installation_of_framework]
 +
jlabsolid:test

Revision as of 22:50, 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 e6f21d45b0f58f52631a5c46fa3b4c9d
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

how to make it it

The SoLID docker container images are at store at docker store with account jlabsolid https://store.docker.com/profiles/jlabsolid

They are in 3 layers:

1. jlabsolidbase include a centos base images with some necessary rpms; 
2. jlabsolidapps add various applications above jlabsolidbase; 
3. jlabsolid add implementation of SoLID simulation,reconstruction,analysis above jlabsolidapps to complete solid software release

The test images are

jlabsolidbase:test is auto built on docker cloud from this Dockerfile
jlabsolidapps:test is based on jlabsolidbase:test and build manually by adding jlab framework 1.3 [1]
jlabsolid:test