From: Tom Clegg Date: Thu, 19 May 2022 15:26:59 +0000 (-0400) Subject: Merge branch '19099-singularity-container-shell' X-Git-Tag: 2.5.0~163 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/469ea187586ea8017e26874c2d80414ce7571fae Merge branch '19099-singularity-container-shell' closes #19099 Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- 469ea187586ea8017e26874c2d80414ce7571fae diff --cc lib/crunchrun/executor.go index 0a65f4d634,b5b7884339..1ed460acd9 --- a/lib/crunchrun/executor.go +++ b/lib/crunchrun/executor.go @@@ -60,6 -60,8 +60,8 @@@ type containerExecutor interface // Release resources (temp dirs, stopped containers) Close() - // Name of runtime engine ("docker", "singularity") + // Name and version of runtime engine ("docker 20.10.16", "singularity-ce version 3.9.9") Runtime() string + + GatewayTarget } diff --cc lib/crunchrun/singularity.go index 1af0d420e4,2d8962e96a..1da401f859 --- a/lib/crunchrun/singularity.go +++ b/lib/crunchrun/singularity.go @@@ -5,12 -5,17 +5,18 @@@ package crunchrun import ( + "bytes" + "errors" "fmt" "io/ioutil" + "net" "os" "os/exec" + "os/user" + "regexp" "sort" + "strconv" + "strings" "syscall" "time" diff --cc lib/crunchrun/singularity_test.go index bad2abef33,7e5819bb48..e4c7cdb308 --- a/lib/crunchrun/singularity_test.go +++ b/lib/crunchrun/singularity_test.go @@@ -47,6 -77,6 +77,6 @@@ func (s *singularityStubSuite) TestSing c.Check(err, IsNil) e.imageFilename = "/fake/image.sif" cmd := e.execCmd("./singularity") - c.Check(cmd.Args, DeepEquals, []string{"./singularity", "exec", "--containall", "--cleanenv", "--pwd", "/WorkingDir", "--net", "--network=none", "--nv", "--bind", "/hostpath:/mnt:ro", "/fake/image.sif"}) + c.Check(cmd.Args, DeepEquals, []string{"./singularity", "exec", "--containall", "--cleanenv", "--pwd=/WorkingDir", "--net", "--network=none", "--nv", "--bind", "/hostpath:/mnt:ro", "/fake/image.sif"}) - c.Check(cmd.Env, DeepEquals, []string{"SINGULARITYENV_FOO=bar"}) + c.Check(cmd.Env, DeepEquals, []string{"SINGULARITYENV_FOO=bar", "SINGULARITY_NO_EVAL=1"}) }