hsuwill000 commited on
Commit
de525b2
·
verified ·
1 Parent(s): 6bf7242

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -29
app.py CHANGED
@@ -1,31 +1,3 @@
1
  import subprocess
2
  import os
3
-
4
- def run_command(command, cwd=None):
5
- """Executes a shell command and prints output"""
6
- result = subprocess.run(command, cwd=cwd, text=True, capture_output=True, shell=True)
7
- if result.returncode != 0:
8
- print(f"Error executing command: {command}")
9
- print(result.stderr)
10
- else:
11
- print(result.stdout)
12
-
13
- def install_openblas():
14
- # Step 1: Clone the OpenBLAS repository
15
- print("Cloning the OpenBLAS repository...")
16
- run_command("git clone https://github.com/OpenMathLib/OpenBLAS.git")
17
-
18
- # Step 2: Change to the OpenBLAS directory
19
- os.chdir("OpenBLAS")
20
-
21
- # Step 3: Build OpenBLAS
22
- print("Building OpenBLAS...")
23
- run_command("make TARGET=SKYLAKEX NUM_THREADS=20 BINARY=64")
24
-
25
- # Step 4: Install OpenBLAS
26
- print("Installing OpenBLAS...")
27
- run_command("make install")
28
-
29
- if __name__ == "__main__":
30
- run_command("gfortran")
31
- #install_openblas()
 
1
  import subprocess
2
  import os
3
+ os.system("apt-cache search openblas")