Spaces:
Runtime error
Runtime error
FlawedLLM
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
|
2 |
# from huggingface_hub import login, HfFolder
|
3 |
import subprocess
|
4 |
-
import getpass
|
5 |
-
|
6 |
-
def run_sudo_command(cmd):
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
# Run the ldconfig command
|
15 |
-
run_sudo_command(["ldconfig", "/usr/lib64-nvidia"])
|
16 |
|
17 |
def run_command(cmd, shell=False):
|
18 |
"""Runs a shell command and prints the output."""
|
|
|
1 |
+
import torch; torch.version.cuda
|
2 |
# from huggingface_hub import login, HfFolder
|
3 |
import subprocess
|
4 |
+
# import getpass
|
5 |
+
|
6 |
+
# def run_sudo_command(cmd):
|
7 |
+
# try:
|
8 |
+
# password = getpass.getpass(prompt="Enter your sudo password: ") # Securely get the password
|
9 |
+
# result = subprocess.run(["sudo", "-S"] + cmd, input=password.encode(), capture_output=True, text=True, check=True)
|
10 |
+
# print(result.stdout)
|
11 |
+
# except subprocess.CalledProcessError as e:
|
12 |
+
# print(f"Error executing command: {e.stderr}")
|
13 |
+
|
14 |
+
# # Run the ldconfig command
|
15 |
+
# run_sudo_command(["ldconfig", "/usr/lib64-nvidia"])
|
16 |
|
17 |
def run_command(cmd, shell=False):
|
18 |
"""Runs a shell command and prints the output."""
|