@@ -74,7 +74,7 @@ def main():
74
74
cmd .extend (["--contain" ]) # use minimal /dev and empty other directories (e.g. /tmp and $HOME)
75
75
cmd .extend (["--ipc" ]) # run container in a new IPC namespace
76
76
cmd .extend (["--pid" ]) # run container in a new PID namespace
77
- cmd .extend (["--bind" , f"{ os .getcwd ()} :/ " ]) # bind current directory for dirac_container.sh
77
+ cmd .extend (["--bind" , f"{ os .getcwd ()} " ]) # bind current directory for dirac_container.sh
78
78
if proxy_location :
79
79
cmd .extend (["--bind" , f"{ proxy_location } :/etc/proxy" ]) # bind proxy file
80
80
cmd .extend (["--bind" , f"{ getCAsLocation ()} :/etc/grid-security/certificates" ]) # X509_CERT_DIR
@@ -90,12 +90,12 @@ def main():
90
90
cmd .extend (["--bind" , f"{ bind_path } :{ bind_path } " ])
91
91
else :
92
92
gLogger .warning (f"Bind path { bind_path } does not exist, skipping" )
93
- cmd .extend (["--cwd" , "/ " ]) # set working directory
93
+ cmd .extend (["--cwd" , f" { os . getcwd () } " ]) # set working directory
94
94
95
95
rootImage = user_image or gConfig .getValue ("/Resources/Computing/Singularity/ContainerRoot" ) or CONTAINER_DEFROOT
96
96
97
97
if os .path .isdir (rootImage ) or os .path .isfile (rootImage ):
98
- cmd .extend ([rootImage , ". /dirac_container.sh" ])
98
+ cmd .extend ([rootImage , f" { os . getcwd () } /dirac_container.sh" ])
99
99
else :
100
100
# if we are here is because there's no image, or it is not accessible (e.g. not on CVMFS)
101
101
gLogger .error ("Apptainer image to exec not found: " , rootImage )
0 commit comments