          """
          chk = os.popen("ldconfig -p | grep -P \"libcudnn.so.\\d+\" | head -n 1").read()
          chk = chk.strip().replace("libcudnn.so.", "")
          if not chk:
              return list()
  
          cudnn_vers = chk[0]
          header_files = [f"cudnn_v{cudnn_vers}.h"] + self._cudnn_header_files
  
          cudnn_path = os.path.realpath(chk[chk.find("=>") + 3:chk.find("libcudnn") - 1])
 
</s> remove         installed_packages = dict()
        chk = Popen("\"{}\" -m pip freeze".format(sys.executable),
                    shell=True, stdout=PIPE)
        installed = chk.communicate()[0].decode(self.encoding).splitlines()
 </s> add         installed_packages = {}
        with Popen(f"\"{sys.executable}\" -m pip freeze", shell=True, stdout=PIPE) as chk:
            installed = chk.communicate()[0].decode(self.encoding).splitlines() </s> remove             chk = Popen(condaexe + [pkg], shell=shell, stdout=PIPE)
            available = [line.split()
                         for line in chk.communicate()[0].decode(self.env.encoding).splitlines()
                         if line.startswith(pkg)]
            compatible = [req for req in available
                          if (pkg == "cudatoolkit" and req[1].startswith(versions[0]))
                          or (pkg == "cudnn" and versions[0] in req[2]
                              and req[1].startswith(versions[1]))]
 </s> add             with Popen(condaexe + [pkg], shell=shell, stdout=PIPE) as chk:
                available = [line.split()
                             for line
                             in chk.communicate()[0].decode(self.env.encoding).splitlines()
                             if line.startswith(pkg)]
                compatible = [req for req in available
                              if (pkg == "cudatoolkit" and req[1].startswith(versions[0]))
                              or (pkg == "cudnn" and versions[0] in req[2]
                                  and req[1].startswith(versions[1]))]
 </s> remove         retval = dict()
 </s> add         retval = {} </s> remove             partial_x, _ = tf.split(inputs,
                                    [partial_size, layer_size - partial_size],
                                    axis=self.axis)
 </s> add             partial_x, _ = tf.split(  # pylint:disable=redundant-keyword-arg,no-value-for-parameter
                inputs,
                [partial_size, layer_size - partial_size],
                axis=self.axis) </s> remove         chk = Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE)
        stdout, stderr = chk.communicate()
 </s> add         with Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE) as chk:
            stdout, stderr = chk.communicate()
            return []
          """
          chk = os.popen("ldconfig -p | grep -P \"libcudnn.so.\\d+\" | head -n 1").read()
          chk = chk.strip().replace("libcudnn.so.", "")
          if not chk:
            return []
  
          cudnn_vers = chk[0]
          header_files = [f"cudnn_v{cudnn_vers}.h"] + self._cudnn_header_files
  
          cudnn_path = os.path.realpath(chk[chk.find("=>") + 3:chk.find("libcudnn") - 1])
keep keep keep keep replace keep keep keep keep keep
 Update code to support Tensorflow versions up to 2.8 (#1213)

* Update maximum tf version in setup + requirements

* - bump max version of tf version in launcher
- standardise tf version check

* update keras get_custom_objects  for tf>2.6

* bugfix: force black text in GUI file dialogs (linux)

* dssim loss - Move to stock tf.ssim function

* Update optimizer imports for compatibility

* fix logging for tf2.8

* Fix GUI graphing for TF2.8

* update tests

* bump requirements.txt versions

* Remove limit on nvidia-ml-py

* Graphing bugfixes
  - Prevent live graph from displaying if data not yet available

* bugfix: Live graph. Collect loss labels correctly

* fix: live graph - swallow inconsistent loss errors

* Bugfix: Prevent live graph from clearing during training

* Fix graphing for AMD 
setup.py