Spaces:
Sleeping
Sleeping
Add nvidia-cuda-toolkit to packages.txt; restore CUDA packages to requirements.txt; clean up app.py
Browse files- app.py +0 -27
- packages.txt +1 -0
- requirements.txt +3 -5
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import sys
|
| 2 |
import os
|
| 3 |
-
import subprocess
|
| 4 |
import tempfile
|
| 5 |
import shutil
|
| 6 |
import traceback
|
|
@@ -8,32 +7,6 @@ import json
|
|
| 8 |
import random
|
| 9 |
from pathlib import Path
|
| 10 |
|
| 11 |
-
# nvdiffrast and diso require CUDA at compile time — install at runtime
|
| 12 |
-
# (ZeroGPU build containers don't have nvcc; runtime containers do)
|
| 13 |
-
def _runtime_install(*packages):
|
| 14 |
-
subprocess.run([sys.executable, "-m", "pip", "install", "--quiet", *packages], check=True)
|
| 15 |
-
|
| 16 |
-
try:
|
| 17 |
-
import nvdiffrast.torch as dr # noqa: F401
|
| 18 |
-
except (ImportError, Exception):
|
| 19 |
-
_runtime_install(
|
| 20 |
-
"nvdiffrast @ git+https://github.com/NVlabs/nvdiffrast.git@253ac4fcea7de5f396371124af597e6cc957bfae"
|
| 21 |
-
)
|
| 22 |
-
|
| 23 |
-
try:
|
| 24 |
-
import diso # noqa: F401
|
| 25 |
-
except (ImportError, Exception):
|
| 26 |
-
_runtime_install(
|
| 27 |
-
"diso @ git+https://github.com/SarahWeiii/diso.git@9792ad928ccb09bdec938779651ee03e395758a6"
|
| 28 |
-
)
|
| 29 |
-
|
| 30 |
-
try:
|
| 31 |
-
import detectron2 # noqa: F401
|
| 32 |
-
except (ImportError, Exception):
|
| 33 |
-
_runtime_install(
|
| 34 |
-
"detectron2 @ git+https://github.com/facebookresearch/detectron2.git@8a9d885b3d4dcf1bef015f0593b872ed8d32b4ab"
|
| 35 |
-
)
|
| 36 |
-
|
| 37 |
import cv2
|
| 38 |
import gradio as gr
|
| 39 |
import spaces
|
|
|
|
| 1 |
import sys
|
| 2 |
import os
|
|
|
|
| 3 |
import tempfile
|
| 4 |
import shutil
|
| 5 |
import traceback
|
|
|
|
| 7 |
import random
|
| 8 |
from pathlib import Path
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
import cv2
|
| 11 |
import gradio as gr
|
| 12 |
import spaces
|
packages.txt
CHANGED
|
@@ -8,3 +8,4 @@ cmake
|
|
| 8 |
ninja-build
|
| 9 |
build-essential
|
| 10 |
pkg-config
|
|
|
|
|
|
| 8 |
ninja-build
|
| 9 |
build-essential
|
| 10 |
pkg-config
|
| 11 |
+
nvidia-cuda-toolkit
|
requirements.txt
CHANGED
|
@@ -8,11 +8,9 @@ clip @ git+https://github.com/openai/CLIP.git@d05afc436d78f1c48dc0dbf8e5980a9d47
|
|
| 8 |
mvadapter @ git+https://github.com/huanngzh/MV-Adapter.git@4277e0018232bac82bb2c103caf0893cedb711be
|
| 9 |
chumpy @ https://huggingface.co/datasets/Daankular/wheels/resolve/main/chumpy-0.71-py3-none-any.whl
|
| 10 |
skel @ git+https://github.com/MarilynKeller/SKEL.git@c32cf16581295bff19399379efe5b776d707cd95
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
# detectron2 requires CUDA at compile time; installed at runtime in app.py
|
| 15 |
-
# detectron2 @ git+https://github.com/facebookresearch/detectron2.git@8a9d885b3d4dcf1bef015f0593b872ed8d32b4ab
|
| 16 |
|
| 17 |
# Core ML
|
| 18 |
accelerate
|
|
|
|
| 8 |
mvadapter @ git+https://github.com/huanngzh/MV-Adapter.git@4277e0018232bac82bb2c103caf0893cedb711be
|
| 9 |
chumpy @ https://huggingface.co/datasets/Daankular/wheels/resolve/main/chumpy-0.71-py3-none-any.whl
|
| 10 |
skel @ git+https://github.com/MarilynKeller/SKEL.git@c32cf16581295bff19399379efe5b776d707cd95
|
| 11 |
+
nvdiffrast @ git+https://github.com/NVlabs/nvdiffrast.git@253ac4fcea7de5f396371124af597e6cc957bfae
|
| 12 |
+
diso @ git+https://github.com/SarahWeiii/diso.git@9792ad928ccb09bdec938779651ee03e395758a6
|
| 13 |
+
detectron2 @ git+https://github.com/facebookresearch/detectron2.git@8a9d885b3d4dcf1bef015f0593b872ed8d32b4ab
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# Core ML
|
| 16 |
accelerate
|