lcolladotor / bioc_team_ds

R/Bioconductor-powered Team Data Science by Leonardo Collado Torres

Home Page:https://lcolladotor.github.io/bioc_team_ds/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transfer node

muschellij2 opened this issue · comments

The line

if [[ $HOSTNAME == compute-* ]] || [[ $HOSTNAME == transfer-* ]]; then
is great, but if you happen to have other modules loaded, it can cause an issue with scp on the transfer node. For example, I always load conda_R on all compute, so I had that in there. Once I took out || [[ $HOSTNAME == transfer-* ]], scp for transfer worked again.

Well, for non-interactive ssh use (including scp) that shouldn't happen, indeed. So I guess it's good to disable most of the ~/.bashrc code meant for interactive use, like that one, with something like this:

#exit for noninteractive shells
[[ ${-#*i} != ${-} ]] || return

In my config I put the above lines at the top, even before the # Source global definitions block sourcing /etc/bashrc, but after I added a custom PATH and a few other env vars settings that could be convenient for running some of my scripts through non-interactive ssh (but no module loading in that top section!)