(self, arch="x86-64")
return dir_list
Find host nvidia libraries via ldconfig
Find host nvidia libraries via ldconfig
Find host nvidia libraries via ldconfig
def _find_host_dir_ldconfig(self, arch="x86-64"):
        """Find host nvidia libraries via ldconfig"""
        dir_list = set()
        ld_data = Uprocess().get_output(["ldconfig", "-p"])
        if ld_data:
            regexp = "[ |\t]%s[^ ]* .*%s.*=> (/.*)"
            for line in ld_data.split('\n'):
                for lib in self._nvidia_main_libs:
                    match = re.search(regexp % (lib, arch), line)
                    if match:
                        dir_list.add(os.path.realpath(
                            os.path.dirname(match.group(1))) + '/')
        Msg().out("Info: List nvidia libs via ldconfig", dir_list, l=Msg.DBG)
        return dir_list
def _find_host_dir_ldconfig ( self , arch = "x86-64" ) : dir_list = set ( ) ld_data = Uprocess ( ) . get_output ( [ "ldconfig" , "-p" ] ) if ld_data : regexp = "[ |\t]%s[^ ]* .*%s.*=> (/.*)" for line in ld_data . split ( '\n' ) : for lib in self . _nvidia_main_libs : match = re . search ( regexp % ( lib , arch ) , line ) if match : dir_list . add ( os . path . realpath ( os . path . dirname ( match . group ( 1 ) ) ) + '/' ) Msg ( ) . out ( "Info: List nvidia libs via ldconfig" , dir_list , l = Msg . DBG ) return dir_list