Rstudio singularity: command not found

Using “module singularity” was giving the /etc/timezone error so I installed version 3.5.3 on the compute node (Singularity fail - TimeZone issue - RStudio issues. Anyone able to help?). Checked the singularity version and ran test case it it seems to be working fine.

compute-19-10:$ singularity --version
singularity version 3.5.3

compute-19 10: $ singularity exec library://alpine cat /etc/alpine-release
INFO: Downloading library image

When running RStudio received received the following error.

  • echo ‘Starting up rserver…’
  • singularity run -B /tmp/745685.1.ondemand/tmp.WFNkMibuN3:/tmp /usr/local/project/ondemand/singularity/rstudio/rserver-launcher-centos7.simg --www-port 28668 --auth-none 0 --auth-pam-helper-path /home/thomasbr/ondemand/data/sys/dashboard/batch_connect/dev/RStudio/output/bdc82889-1372-412d-9599-1ca0939b3581/bin/auth --auth-encrypt-password 0 --rsession-path /home/thomasbr/ondemand/data/sys/dashboard/batch_connect/dev/RStudio/output/bdc82889-1372-412d-9599-1ca0939b3581/
    /home/thomasbr/ondemand/data/sys/dashboard/batch_connect/dev/RStudio/output/bdc82889-1372-412d-9599-1ca0939b3581/ line 58: singularity: command not found
  • echo ‘Singularity as exited…’

You could use the absolute path here, but if you can’t find what’s in /usr/bin you’ll have a serious issue. Also just to be sure, when you installed it, you did so across your compute nodes right? That’s where it needs to exist, on the given compute node this job gets executed on.

I’d add a simple echo "my path is '$PATH'" just prior to starting singularity to debug what’s up with your $PATH.

singularity is installed in /usr/local/bin using the instructions at

my path on the compute node contains

The PATH that is printed from the contains /sbin:/bin:/usr/sbin:/usr/bin. It does not contain the path to the singularity program as installed.

OOD seems to be building its own PATH and not using (in part) what comes from the user?

Added it to the PATH variable in the file and now it is working.