FlawedLLM commited on
Commit
3362f3e
·
verified ·
1 Parent(s): 22703ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
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
- 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."""
 
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."""