Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ for sitedir in site.getsitepackages():
|
|
26 |
# Clear caches so importlib will pick up new modules
|
27 |
importlib.invalidate_caches()
|
28 |
|
29 |
-
|
30 |
|
31 |
def install_cuda_toolkit():
|
32 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run"
|
@@ -56,8 +56,14 @@ print("finished")
|
|
56 |
header_path = "/usr/local/cuda/include/cuda_runtime.h"
|
57 |
print(f"{header_path} exists:", os.path.exists(header_path))
|
58 |
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
|
63 |
# tell Python to re-scan site-packages now that the egg-link exists
|
|
|
26 |
# Clear caches so importlib will pick up new modules
|
27 |
importlib.invalidate_caches()
|
28 |
|
29 |
+
def sh(cmd): subprocess.check_call(cmd, shell=True)
|
30 |
|
31 |
def install_cuda_toolkit():
|
32 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run"
|
|
|
56 |
header_path = "/usr/local/cuda/include/cuda_runtime.h"
|
57 |
print(f"{header_path} exists:", os.path.exists(header_path))
|
58 |
|
59 |
+
def sh(cmd_list, extra_env=None):
|
60 |
+
env = os.environ.copy()
|
61 |
+
if extra_env:
|
62 |
+
env.update(extra_env)
|
63 |
+
subprocess.check_call(cmd_list, env=env)
|
64 |
+
|
65 |
+
# install with FORCE_CUDA=1
|
66 |
+
sh(["pip", "install", "diso"], {"FORCE_CUDA": "1"})
|
67 |
|
68 |
|
69 |
# tell Python to re-scan site-packages now that the egg-link exists
|