There is no documentation about these files.
My bad its hidden files in root, rename shell in .shell, it should work :
/.exec
/.shell
/.run

There is a /environment file too where you can put your own variables

Le 08/05/2017 à 20:56, Siddiqui, Shahzeb a écrit :

Cedric,

I would think this should be a feature with *singularity shell* command rather than a configuration file inside a container. Also after applying the change in /shell in the container, I was unable to see the changes when shelling into container.

Could you please provide documentation where you found these files /exec /run /shell. They don’t seem to be part of the container on a centos image.

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *CEDRIC CLERGET
*Sent:* Thursday, May 4, 2017 2:21 PM
*To:* [email protected]
*Subject:* Re: [easybuild] eb in singularity

Hello Shahzeb,

If you want to load /etc/profile each time you launch image, you could add -l to shebang (#!/bin/sh -l) in /exec /run /shell files located in container, it will simulate a shell login and will load /etc/profile

Best regards,

Cédric Clerget

------------------------------------------------------------------------

*De: *"Siddiqui, Shahzeb" <[email protected] <mailto:[email protected]>>
*À: *[email protected] <mailto:[email protected]>
*Cc: *"Gregory M. Kurtzer" <[email protected] <mailto:[email protected]>>
*Envoyé: *Jeudi 4 Mai 2017 18:53:35
*Objet: *[easybuild] eb in singularity

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.

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...

== 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



--
Cédric Clerget
Mésocentre de calcul de Franche-Comté
16, Route de Gray - 25030 Besançon
Tél: 03 81 66 20 12
Mail: [email protected]

Reply via email to