File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ def main():
2323 top = cwl .load_document (args .input )
2424
2525 for req in set (traverse (top )):
26- image_name = get_image_name (req )
2726 if args .singularity :
27+ image_name = get_image_name_singularity (req )
2828 save_docker_image_singularity (req , image_name , args .dir )
2929 else :
30+ image_name = get_image_name (req )
3031 save_docker_image (req , image_name , args .dir )
3132
3233 print (load_docker_image (image_name ))
@@ -36,6 +37,15 @@ def get_image_name(req):
3637 return '' .join (req .split ('/' )) + '.tar'
3738
3839
40+ def get_image_name_singularity (req ):
41+ CHARS_TO_REPLACE = ['/' , ':' ]
42+ NEW_CHAR = '-'
43+ image_name = req
44+ for char in CHARS_TO_REPLACE :
45+ image_name = image_name .replace (char , NEW_CHAR )
46+ return f'{ image_name } .img'
47+
48+
3949def load_docker_image (image_name ):
4050 return f'udocker load -i { image_name } '
4151
You can’t perform that action at this time.
0 commit comments