@@ -164,7 +164,8 @@ def create_runtime(self, env, rm_container=True, record_container_id=False, cidf
164
164
cidfile_prefix = "" , ** kwargs ):
165
165
# type: (MutableMapping[Text, Text], bool, bool, Text, Text, **Any) -> List
166
166
167
- runtime = [u"singularity" , u"--quiet" , u"exec" , u"--contain" ]
167
+ runtime = [u"singularity" , u"--quiet" , u"exec" , u"--contain" , u"--pid" ,
168
+ u"--ipc" , u"--userns" ]
168
169
runtime .append (u"--bind" )
169
170
runtime .append (u"{}:{}:rw" .format (
170
171
docker_windows_path_adjust (os .path .realpath (self .outdir )),
@@ -182,7 +183,9 @@ def create_runtime(self, env, rm_container=True, record_container_id=False, cidf
182
183
183
184
if kwargs .get ("custom_net" , None ) is not None :
184
185
raise UnsupportedRequirement (
185
- "Singularity implementation does not support networking" )
186
+ "Singularity implementation does not support custom networking" )
187
+ elif kwargs .get ("disable_net" , None ):
188
+ runtime .append (u"--net" )
186
189
187
190
env ["SINGULARITYENV_TMPDIR" ] = "/tmp"
188
191
env ["SINGULARITYENV_HOME" ] = self .builder .outdir
0 commit comments