{"action":"created","issue":{"url":"https://api.github.com/repos/gmkurtzer/singularity/issues/177","repository_url":"https://api.github.com/repos/gmkurtzer/singularity","labels_url":"https://api.github.com/repos/gmkurtzer/singularity/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/gmkurtzer/singularity/issues/177/comments","events_url":"https://api.github.com/repos/gmkurtzer/singularity/issues/177/events","html_url":"https://github.com/gmkurtzer/singularity/issues/177","id":168760248,"number":177,"title":"Container execution not dealing with environment modules bash functions","user":{"login":"moskalenko","id":151978,"avatar_url":"https://avatars.githubusercontent.com/u/151978?v=3","gravatar_id":"","url":"https://api.github.com/users/moskalenko","html_url":"https://github.com/moskalenko","followers_url":"https://api.github.com/users/moskalenko/followers","following_url":"https://api.github.com/users/moskalenko/following{/other_user}","gists_url":"https://api.github.com/users/moskalenko/gists{/gist_id}","starred_url":"https://api.github.com/users/moskalenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moskalenko/subscriptions","organizations_url":"https://api.github.com/users/moskalenko/orgs","repos_url":"https://api.github.com/users/moskalenko/repos","events_url":"https://api.github.com/users/moskalenko/events{/privacy}","received_events_url":"https://api.github.com/users/moskalenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-01T22:49:48Z","updated_at":"2016-08-11T05:04:17Z","closed_at":null,"body":"Executing singularity containers in an environment set up with an environment modules system (Lmod: https://github.com/TACC/Lmod). results in errors. For example, starting 'R' (https://cran.r-project.org/) from a singularity container after loading paths to singularity and to the image directory via environment modules results in the following errors:\r\n\r\n/bin/sh: BASH_FUNC_histgrep(): line 0: syntax error near unexpected token `)'\r\n/bin/sh: BASH_FUNC_histgrep(): line 0: `BASH_FUNC_histgrep() () {  grep --color=auto -r \"$@\" ~/.history;'\r\n/bin/sh: error importing function definition for `BASH_FUNC_histgrep'\r\n/bin/sh: BASH_FUNC_clearMT(): line 0: syntax error near unexpected token `)'\r\n/bin/sh: BASH_FUNC_clearMT(): line 0: `BASH_FUNC_clearMT() () {  eval $($LMOD_DIR/clearMT_cmd bash)'\r\n/bin/sh: error importing function definition for `BASH_FUNC_clearMT'\r\n/bin/sh: BASH_FUNC_ml(): line 0: syntax error near unexpected token `)'\r\n/bin/sh: BASH_FUNC_ml(): line 0: `BASH_FUNC_ml() () {  eval $($LMOD_DIR/ml_cmd \"$@\")'\r\n/bin/sh: error importing function definition for `BASH_FUNC_ml'\r\n/bin/bash: BASH_FUNC_ml(): line 0: syntax error near unexpected token `)'\r\n/bin/bash: BASH_FUNC_ml(): line 0: `BASH_FUNC_ml() () {  eval $($LMOD_DIR/ml_cmd \"$@\")'\r\n/bin/bash: error importing function definition for `BASH_FUNC_ml'\r\n/bin/bash: BASH_FUNC_histgrep(): line 0: syntax error near unexpected token `)'\r\n/bin/bash: BASH_FUNC_histgrep(): line 0: `BASH_FUNC_histgrep() () {  grep --color=auto -r \"$@\" ~/.history;'\r\n/bin/bash: error importing function definition for `BASH_FUNC_histgrep'\r\n/bin/bash: BASH_FUNC_clearMT(): line 0: syntax error near unexpected token `)'\r\n/bin/bash: BASH_FUNC_clearMT(): line 0: `BASH_FUNC_clearMT() () {  eval $($LMOD_DIR/clearMT_cmd bash)'\r\n/bin/bash: error importing function definition for `BASH_FUNC_clearMT'\r\n\r\n\r\nAll of the above errors seem to be due to an issue with bash functions exported by Lmod EMS. Outside of the container the functions are set up by sourcing a system-wide /etc/profies.d/modules.sh script and the subsequently called code. "},"comment":{"url":"https://api.github.com/repos/gmkurtzer/singularity/issues/comments/239074675","html_url":"https://github.com/gmkurtzer/singularity/issues/177#issuecomment-239074675","issue_url":"https://api.github.com/repos/gmkurtzer/singularity/issues/177","id":239074675,"user":{"login":"moskalenko","id":151978,"avatar_url":"https://avatars.githubusercontent.com/u/151978?v=3","gravatar_id":"","url":"https://api.github.com/users/moskalenko","html_url":"https://github.com/moskalenko","followers_url":"https://api.github.com/users/moskalenko/followers","following_url":"https://api.github.com/users/moskalenko/following{/other_user}","gists_url":"https://api.github.com/users/moskalenko/gists{/gist_id}","starred_url":"https://api.github.com/users/moskalenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moskalenko/subscriptions","organizations_url":"https://api.github.com/users/moskalenko/orgs","repos_url":"https://api.github.com/users/moskalenko/repos","events_url":"https://api.github.com/users/moskalenko/events{/privacy}","received_events_url":"https://api.github.com/users/moskalenko/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T05:04:17Z","updated_at":"2016-08-11T05:04:17Z","body":"On the host"}}
{"actor":{"display_login":"moskalenko"}}