gokaygokay commited on
Commit
39369ef
·
verified ·
1 Parent(s): d2dd7de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -13,21 +13,21 @@ def run_command(command):
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 without sudo
24
- install_command = "sh cuda_12.2.0_535.54.03_linux.run"
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
 
 
13
  exit(1)
14
  return output.decode('utf-8')
15
 
16
+ commands = [
17
+ "wget https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.1-1_all.deb",
18
+ "dpkg -i cuda-keyring_1.1-1_all.deb",
19
+ "add-apt-repository contrib",
20
+ "apt-get update",
21
+ "apt-get -y install cuda"
22
+ ]
23
+
24
+ for command in commands:
25
+ print(f"Executing: {command}")
26
+ if not run_command(command):
27
+ print("Installation failed.")
28
+ sys.exit(1)
29
+
30
+ print("CUDA installation completed successfully.")
31
 
32
  def install_packages():
33