Spaces:
Running
on
T4
Running
on
T4
ffreemt
commited on
Commit
·
297f7a4
1
Parent(s):
f8bc02a
Update lsb_release -a bitsandbytes device_map={'': 0} rich, check nvidia-smi with subproces.run
Browse files
app.py
CHANGED
@@ -52,7 +52,22 @@ from transformers.generation import GenerationConfig
|
|
52 |
|
53 |
from example_list import css, example_list
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
if True:
|
|
|
|
|
56 |
logger.info("lsb_release -a")
|
57 |
ret = sp.run("lsb_release -a", capture_output=1, check=0, shell=1, encoding='utf8')
|
58 |
if ret.stdout:
|
|
|
52 |
|
53 |
from example_list import css, example_list
|
54 |
|
55 |
+
|
56 |
+
def run_cmd(cmd):
|
57 |
+
"""Execute cmd."""
|
58 |
+
logger.info(f"{cmd=}")
|
59 |
+
ret = sp.run(cmd, capture_output=1, check=0, shell=1, encoding='utf8')
|
60 |
+
if ret.stdout:
|
61 |
+
rich.print(ret.stdout)
|
62 |
+
if ret.stderr:
|
63 |
+
rich.print("[red bold]" + ret.stdout)
|
64 |
+
|
65 |
+
# /home/user/.pyenv/versions/3.10.13/lib/python3.10/site-packages/bitsandbytes
|
66 |
+
|
67 |
+
|
68 |
if True:
|
69 |
+
run_cmd("ls -l /home/user/.pyenv/versions/3.10.13/lib/python3.10/site-packages/bitsandbytes")
|
70 |
+
|
71 |
logger.info("lsb_release -a")
|
72 |
ret = sp.run("lsb_release -a", capture_output=1, check=0, shell=1, encoding='utf8')
|
73 |
if ret.stdout:
|