Spaces:
Running
on
Zero
Running
on
Zero
Andrzej Kryszpiniuk
commited on
Commit
·
61073b1
1
Parent(s):
f7ff9dc
Use runtime install with --no-build-isolation (fix for ZeroGPU build)
Browse files- app.py +11 -3
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -112,9 +112,17 @@ except ImportError:
|
|
| 112 |
# (Optional) side-step allocator+NVML quirks in restrictive containers
|
| 113 |
env.setdefault("PYTORCH_NO_CUDA_MEMORY_CACHING", "1")
|
| 114 |
|
| 115 |
-
# FIX:
|
| 116 |
-
|
| 117 |
-
import diff_gaussian_rasterization
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
|
| 120 |
from gslrm.model.gaussians_renderer import render_turntable, imageseq2video
|
|
|
|
| 112 |
# (Optional) side-step allocator+NVML quirks in restrictive containers
|
| 113 |
env.setdefault("PYTORCH_NO_CUDA_MEMORY_CACHING", "1")
|
| 114 |
|
| 115 |
+
# FIX: Install from source with --no-build-isolation to use existing torch
|
| 116 |
+
try:
|
| 117 |
+
import diff_gaussian_rasterization
|
| 118 |
+
except ImportError:
|
| 119 |
+
print("Installing diff-gaussian-rasterization...")
|
| 120 |
+
subprocess.check_call(
|
| 121 |
+
[sys.executable, "-m", "pip", "install", "--no-build-isolation",
|
| 122 |
+
"git+https://github.com/graphdeco-inria/diff-gaussian-rasterization"],
|
| 123 |
+
env=env,
|
| 124 |
+
)
|
| 125 |
+
import diff_gaussian_rasterization # noqa: F401
|
| 126 |
|
| 127 |
|
| 128 |
from gslrm.model.gaussians_renderer import render_turntable, imageseq2video
|
requirements.txt
CHANGED
|
@@ -26,4 +26,4 @@ pytorch-msssim==1.0.0
|
|
| 26 |
ffmpeg-python==0.2.0
|
| 27 |
tqdm
|
| 28 |
spaces
|
| 29 |
-
|
|
|
|
| 26 |
ffmpeg-python==0.2.0
|
| 27 |
tqdm
|
| 28 |
spaces
|
| 29 |
+
|