vsoch / scif

scientific filesystem: a filesystem organization for scientific software and metadata
https://sci-f.github.io/
Mozilla Public License 2.0
30 stars 13 forks source link

scif run working directory #50

Closed bilke closed 5 years ago

bilke commented 5 years ago

I am running a container with:

singularity run example.simg some_file.prj

some_file.prj is a file in my current working directory on the host. The problem is that inside the container I guess the working directory is set to SCIF-app directory (e.g. /scif/apps/ogs) and consequently my app executable cannot find this file.

When running the container with the following it works:

singularity run example.simg $PWD/some_file.prj

Is the working directory always changed to the SCIF-app directory? More info on my setup below.

The runscript of the container is: exec scif run ogs "$@".

ogs is a SCIF-app:

%appinstall ogs
    ...
%apprun ogs
    exec ogs

Full recipe files:

vsoch commented 5 years ago

Yes this is expected behavior. When you run an app it is run in context of that app, meaning it’s directory.

bilke commented 5 years ago

Ok thanks!