File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ def execute(self,
3030 writable = False ,
3131 contain = False ,
3232 bind = None ,
33- stream = False ):
33+ stream = False ,
34+ nv = False ):
3435
3536 ''' execute: send a command to a container
3637
@@ -46,13 +47,18 @@ def execute(self,
4647 bind: list or single string of bind paths.
4748 This option allows you to map directories on your host system to
4849 directories within your container using bind mounts
50+ nv: if True, load Nvidia Drivers in Runtime.
4951
5052 '''
5153 from spython .utils import check_install
5254 check_install ()
5355
5456 cmd = self ._init_command ('exec' )
5557
58+ # It option leverage the GPU card
59+ if nv is True :
60+ cmd += ['--nv' ]
61+
5662 # If the image is given as a list, it's probably the command
5763 if isinstance (image , list ):
5864 command = image
You can’t perform that action at this time.
0 commit comments