On 09/05/2017 10:37, Jens Timmerman wrote:

@Siddiqui, internally we have a wrapper around singularity that sets the environment and creates a list of commands that basically first invoke singularity and then run the profile and set other environment variables. It was in part (almost fully) written by Kenenth, so it integrates well with EasyBuild, I should inquire with Kenneth if we can make this public, or at least document what it does so you can benefit from his work :)

The wrapper we have around Singularity is mainly to make it a bit easier for users to use containers.

It does some magic to make sure that $LD_LIBRARY_PATH doesn't get trashed when entering the container environment (that happens because Singularity is a setuid tool), but other than that it doesn't really do much.

We have some plans to enhance it to make it easier to run MPI programs in containers and maybe check compability of the container image with the MPI in the system (which is a requirement), but that's just an idea for now...


regards,

Kenneth


Regards,
Jens Timmerman

DP







On Thu, May 4, 2017 at 9:53 AM, Siddiqui, Shahzeb <shahzeb.siddi...@pfizer.com <mailto:shahzeb.siddi...@pfizer.com>> wrote:

    Hello folks,____

    __ __

    I would like to find out how Easybuild and Singularity are going to
    work together. I am trying to design an eb environment in
    Singularity as a container solution to host all of the eb apps in a
    prod environment. Is there anyone in the HPC community that is
    working on this?____

    __ __

    Currently, I have setup a container environment that can build
    packages in container and also install RPMs from easybuild via
    Artifactory that is done through the bootstrap process.____

    __ __

    One of things that puzzles me is how to setup an isolated container
    environment that runs /etc/profile for container. I’ve noticed I
    need to do this inorder to get module command to work in container.
    Currently, I have to do this manually after shelling in.____

    __ __

    __ __

    -bash-4.2$ singularity shell /nfs/grid/software/testing.img __ __

    Singularity: Invoking an interactive shell within container...____

    __ __

    Singularity.testing.img> module --version____

    sh: module: command not found____

    Singularity.testing.img> env | grep MODULEPATH____

    MODULEPATH_ROOT=/usr/share/modulefiles____

MODULEPATH=/modulefiles/Core/:/nfs/grid/software/RHEL7-BUILD/easybuild/modules/all/:/nfs/grid/software/RHEL7/non-easybuild/modules/all/:/nfs/grid/software/RHEL7/easybuild/modules/all/Core:/nfs/grid/software/moduledomains:/etc/modulefiles:/usr/share/modulefiles:/usr/share/modulefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core____

    Singularity.testing.img> unset MODULEPATH____

    Singularity.testing.img> . /etc/profile____

    Singularity.testing.img> . /nfs/grid/software/____

    module-setup.sh  RHEL7/           RHEL7-BUILD/ ____

    Singularity.testing.img> . /nfs/grid/software/module-setup.sh ____

    Singularity.testing.img> ml av____

    __ __

    -----------------------------------------------------------
    /usr/share/lmod/lmod/modulefiles/Core
------------------------------------------------------------____

        lmod/6.5.1    settarg/6.5.1____

    __ __

    ----------------------------------------------------
    /nfs/grid/software/RHEL7-BUILD/easybuild/modules/all
    ----------------------------------------------------____

        EasyBuild/3.1.2____

    __ __

    ----------------------------------------------------
    /nfs/grid/software/RHEL7/easybuild/modules/all/Core
    -----------------------------------------------------____

Advisor/2017_update1 IGV/2.3.80-Java-1.8.0_92 Java/1.8.0_92 gaussian/16-AVX iompi/2017.01 tbb/2017.2.132____

GCC/5.4.0-2.27 Inspector/2017_update1 VTune/2017_update1 gaussian/16-SSE2 (D) ipp/2017.1.132____

GCC/6.2.0-2.27 (D) IntelClusterChecker/2017.1.016 daal/2017.1.132 intel/2017.01 itac/2017.1.024____

    __ __

       Where:____

        D:  Default Module____

    __ __

    Use "module spider" to find all possible modules.____

    Use "module keyword key1 key2 ..." to search for all possible
    modules matching any of the "keys".____

    __ __

    Singularity.testing.img> ml EasyBuild____

    Singularity.testing.img> eb --version____

    This is EasyBuild 3.1.2 (framework: 3.1.2, easyblocks: 3.1.2) on
    host amrndhl1157.pfizer.com <http://amrndhl1157.pfizer.com>.____

    Singularity.testing.img> eb --show-config____

    #____

    # Current EasyBuild configuration____

    # (C: command line argument, D: default value, E: environment
    variable, F: configuration file)____

    #____

    buildpath      (D) = /home/siddis14/.local/easybuild/build____

    installpath    (D) = /home/siddis14/.local/easybuild____

repositorypath (D) = /home/siddis14/.local/easybuild/ebfiles_repo____

    robot-paths    (D) =
/nfs/grid/software/RHEL7-BUILD/easybuild/software/EasyBuild/3.1.2/lib/python2.7/site-packages/easybuild_easyconfigs-3.1.2-py2.7.egg/easybuild/easyconfigs____

    sourcepath     (D) = /home/siddis14/.local/easybuild/sources____

    Singularity.testing.img> eb zlib-1.2.8.eb____

    == temporary log file in case of crash
    /tmp/eb-BfnLvm/easybuild-ybJc4_.log____

    == zlib/1.2.8 is already installed (module found), skipping____

    == No easyconfigs left to be built.____

    == Build succeeded for 0 out of 0____

    == Temporary log file(s) /tmp/eb-BfnLvm/easybuild-ybJc4_.log* have
    been removed.____

    == Temporary directory /tmp/eb-BfnLvm has been removed.____

    Singularity.testing.img> eb zlib-1.2.8.eb --rebuild____

    == temporary log file in case of crash
    /tmp/eb-IMN3vl/easybuild-lWCjI1.log____

    == processing EasyBuild easyconfig
/nfs/grid/software/RHEL7-BUILD/easybuild/software/EasyBuild/3.1.2/lib/python2.7/site-packages/easybuild_easyconfigs-3.1.2-py2.7.egg/easybuild/easyconfigs/z/zlib/zlib-1.2.8.eb____

    == building and installing zlib/1.2.8. <http://1.2.8.>..____

    == fetching files...____

    == creating build dir, resetting environment...____

    == unpacking...____

    == patching...____

    == preparing...____

    == configuring...____

    == building...____

    == testing...____

    == installing...____

    == taking care of extensions...____

    == postprocessing...____

    == sanity checking...____

    == cleaning up...____

    == creating module...____

    == permissions...____

    == packaging...____

    == COMPLETED: Installation ended successfully____

    == Results of the build can be found in the log file(s)
/home/siddis14/.local/easybuild/software/zlib/1.2.8/easybuild/easybuild-zlib-1.2.8-20170504.163248.log____

    == Build succeeded for 1 out of 1____

    == Temporary log file(s) /tmp/eb-IMN3vl/easybuild-lWCjI1.log* have
    been removed.____

    == Temporary directory /tmp/eb-IMN3vl has been removed.____

    __ __

    Singularity.testing.img> module use
    $HOME/.local/easybuild/modules/all____

    __ __

    Due to MODULEPATH changes the following have been reloaded:____

       1) EasyBuild/3.1.2____

    __ __

    Singularity.testing.img> module av____

    __ __

    --------------------------------------------------------
    /home/siddis14/.local/easybuild/modules/all
---------------------------------------------------------____

        EasyBuild/3.1.2 (L,D)    M4/1.4.17 (D)    zlib/1.2.8 (D)____

    __ __

    -----------------------------------------------------------
    /usr/share/lmod/lmod/modulefiles/Core
------------------------------------------------------------____

        lmod/6.5.1    settarg/6.5.1____

    __ __

    ----------------------------------------------------
    /nfs/grid/software/RHEL7-BUILD/easybuild/modules/all
    ----------------------------------------------------____

        EasyBuild/3.1.2____

    __ __

    ----------------------------------------------------
    /nfs/grid/software/RHEL7/easybuild/modules/all/Core
    -----------------------------------------------------____

Advisor/2017_update1 IGV/2.3.80-Java-1.8.0_92 Java/1.8.0_92 gaussian/16-AVX iompi/2017.01 tbb/2017.2.132____

GCC/5.4.0-2.27 Inspector/2017_update1 VTune/2017_update1 gaussian/16-SSE2 (D) ipp/2017.1.132____

GCC/6.2.0-2.27 (D) IntelClusterChecker/2017.1.016 daal/2017.1.132 intel/2017.01 itac/2017.1.024____

    __ __

       Where:____

        L:  Module is loaded____

        D:  Default Module____

    __ __

    Use "module spider" to find all possible modules.____

    Use "module keyword key1 key2 ..." to search for all possible
    modules matching any of the "keys".____

    __ __

    __ __

    __ __

    Shahzeb Siddiqui____

    HPC Linux Engineer____

    B2220-447.2____

    Groton, CT____

    __ __




Reply via email to