[ARVADOS] created: 2.1.0-1480-g064a87772

Git user git at public.arvados.org
Fri Oct 8 14:25:09 UTC 2021


        at  064a8777267b6918ef040589c0b9d75f8df81cd1 (commit)


commit 064a8777267b6918ef040589c0b9d75f8df81cd1
Author: Ward Vandewege <ward at curii.com>
Date:   Fri Oct 8 10:24:28 2021 -0400

    18258: set the SINGULARITY_CACHEDIR to a path underneath our temporary
           space, and clean up after we're done building.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/lib/crunchrun/singularity.go b/lib/crunchrun/singularity.go
index 70ad653b7..9828d8734 100644
--- a/lib/crunchrun/singularity.go
+++ b/lib/crunchrun/singularity.go
@@ -160,7 +160,12 @@ func (e *singularityExecutor) LoadImage(dockerImageID string, imageTarballPath s
 			return err
 		}
 
+		os.Mkdir(e.tmpdir+"/cache", 0700)
+		defer os.RemoveAll(e.tmpdir + "/cache")
+
 		build := exec.Command("singularity", "build", imageFilename, "docker-archive://"+e.tmpdir+"/image.tar")
+		build.Env = os.Environ()
+		build.Env = append(build.Env, "SINGULARITY_CACHEDIR="+e.tmpdir+"/cache")
 		e.logf("%v", build.Args)
 		out, err := build.CombinedOutput()
 		// INFO:    Starting build...

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list