gokaygokay commited on
Commit
da64627
·
verified ·
1 Parent(s): 6979d00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -12
app.py CHANGED
@@ -13,18 +13,21 @@ def run_command(command):
13
  exit(1)
14
  return output.decode('utf-8')
15
 
16
- commands = [
17
- "wget https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run",
18
- "sh cuda_12.2.0_535.54.03_linux.run
19
- ]
20
-
21
- for command in commands:
22
- print(f"Executing: {command}")
23
- if not run_command(command):
24
- print("Installation failed.")
25
- sys.exit(1)
26
-
27
- print("CUDA installation completed successfully.")
 
 
 
28
 
29
  def install_packages():
30
 
 
13
  exit(1)
14
  return output.decode('utf-8')
15
 
16
+ # Download CUDA installer
17
+ download_command = "wget https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
18
+ result = run_command(download_command)
19
+ if result is None:
20
+ print("Failed to download CUDA installer.")
21
+ exit(1)
22
+
23
+ # Run CUDA installer in silent mode
24
+ install_command = "sh cuda_12.2.0_535.54.03_linux.run --silent --toolkit --samples --override"
25
+ result = run_command(install_command)
26
+ if result is None:
27
+ print("Failed to run CUDA installer.")
28
+ exit(1)
29
+
30
+ print("CUDA installation process completed.")
31
 
32
  def install_packages():
33