apptainer / singularity

Singularity has been renamed to Apptainer as part of us moving the project to the Linux Foundation. This repo has been persisted as a snapshot right before the changes.
https://github.com/apptainer/apptainer
Other
2.52k stars 424 forks source link

Issue with --home and --pwd #2778

Closed jmstover closed 5 years ago

jmstover commented 5 years ago

Version of Singularity:

3.1.0-29.ga78434c

Expected behavior

When using --home /some/path:/dest/path --pwd /dest/path ... We change to /dest/path without issue...

$ sudo singularity exec -H /home/gmk:/home/test --pwd /home/test test.sif pwd
/home/test

Actual behavior

$ sudo singularity exec --pwd /home/test -H /home/gmk:/home/test test.sif pwd
WARNING: Could not set container working directory /home/test: chdir /home/test: no such file or directory
/home/test

Steps to reproduce behavior

Use --pwd and -H in conjunction with each other.... for example:

$ singularity exec --pwd /Users/fooo -H /etc:/Users/fooo test.sif pwd
WARNING: Could not set container working directory /Users/fooo: chdir /Users/fooo: no such file or directory
/Users/fooo
al3x609 commented 5 years ago

this works with

$ singularity exec --pwd /Users/fooo -H /etc:/Users/fooo test.sif bash -c 'pwd'

jmstover commented 5 years ago

Not for me from 3.1.0-rc4

$ singularity exec --pwd /Users/fooo -H /etc:/Users/fooo ~/lolcow.sif bash -c 'pwd'
WARNING: cound not set container working directory /Users/fooo: chdir /Users/fooo: no such file or directory
/Users/fooo
al3x609 commented 5 years ago

I have this version. $ singularity version 3.1.0-29.ga78434c

jscook2345 commented 5 years ago

Found the same issue with 3.1.0-rc4.dirty.

cclerget commented 5 years ago

@jmstover @jscook2345 It works but the warning message reports a false error

gmkurtzer commented 5 years ago

Thanks for moving forward with fixing this invalid warning, it has been bugging me!