17816: Set the current working directory in the singularity container
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 15 Jul 2021 17:50:22 +0000 (13:50 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Fri, 16 Jul 2021 14:39:38 +0000 (10:39 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

lib/crunchrun/singularity.go

index 4bec8c3ebed11970c9f0c0734e625c5c32df2523..2a294cf03c4715c36e20230d5610eac5afbdbeaf 100644 (file)
@@ -74,7 +74,7 @@ func (e *singularityExecutor) Create(spec containerSpec) error {
 }
 
 func (e *singularityExecutor) Start() error {
-       args := []string{"singularity", "exec", "--containall", "--no-home", "--cleanenv"}
+       args := []string{"singularity", "exec", "--containall", "--no-home", "--cleanenv", "--pwd", e.spec.WorkingDir}
        if !e.spec.EnableNetwork {
                args = append(args, "--net", "--network=none")
        }