Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,21 +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 |
-
if
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
print("CUDA installation
|
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 |
|