Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -13,18 +13,21 @@ def run_command(command):
|
|
13 |
exit(1)
|
14 |
return output.decode('utf-8')
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
print("
|
|
|
|
|
|
|
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 |
|