ffreemt commited on
Commit
3895ca8
·
1 Parent(s): b55d7c2

Update lsb_release -a bitsandbytes device_map={'': 0} rich, check nvidia-smi with subproces.run

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -541,11 +541,18 @@ with gr.Blocks(
541
 
542
  if __name__ == "__main__":
543
  logger.info("Just record start time")
544
- ret = sp.run("nvidia-smi", capture_output=1, check=0, shell=1, encoding='utf8')
 
545
  if ret.stdout:
546
  rich.print(ret.stdout)
547
  if ret.stderr:
548
  rich.print("[red bold]" + ret.stdout)
549
 
 
 
 
 
 
 
550
 
551
  block.queue(max_size=8).launch(debug=True)
 
541
 
542
  if __name__ == "__main__":
543
  logger.info("Just record start time")
544
+
545
+ ret = sp.run("lsb_release -a", capture_output=1, check=0, shell=1, encoding='utf8')
546
  if ret.stdout:
547
  rich.print(ret.stdout)
548
  if ret.stderr:
549
  rich.print("[red bold]" + ret.stdout)
550
 
551
+ ret = sp.run("nvidia-smi", capture_output=1, check=0, shell=1, encoding='utf8')
552
+ if ret.stdout:
553
+ rich.print(ret.stdout)
554
+ if ret.stderr:
555
+ rich.print("[red bold]" + ret.stdout)
556
+ raise SystemExit("Interrupt by intentioin")
557
 
558
  block.queue(max_size=8).launch(debug=True)