Spaces:
Sleeping
Sleeping
Move detectron2 to runtime install (CUDA build dep)
Browse files- app.py +7 -0
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -27,6 +27,13 @@ except (ImportError, Exception):
|
|
| 27 |
"diso @ git+https://github.com/SarahWeiii/diso.git@9792ad928ccb09bdec938779651ee03e395758a6"
|
| 28 |
)
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
import cv2
|
| 31 |
import gradio as gr
|
| 32 |
import spaces
|
|
|
|
| 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
|
requirements.txt
CHANGED
|
@@ -11,7 +11,8 @@ skel @ git+https://github.com/MarilynKeller/SKEL.git@c32cf16581295bff19399379efe
|
|
| 11 |
# nvdiffrast and diso require CUDA (nvcc) at compile time; installed at runtime in app.py
|
| 12 |
# nvdiffrast @ git+https://github.com/NVlabs/nvdiffrast.git@253ac4fcea7de5f396371124af597e6cc957bfae
|
| 13 |
# diso @ git+https://github.com/SarahWeiii/diso.git@9792ad928ccb09bdec938779651ee03e395758a6
|
| 14 |
-
detectron2
|
|
|
|
| 15 |
|
| 16 |
# Core ML
|
| 17 |
accelerate
|
|
|
|
| 11 |
# nvdiffrast and diso require CUDA (nvcc) at compile time; installed at runtime in app.py
|
| 12 |
# nvdiffrast @ git+https://github.com/NVlabs/nvdiffrast.git@253ac4fcea7de5f396371124af597e6cc957bfae
|
| 13 |
# diso @ git+https://github.com/SarahWeiii/diso.git@9792ad928ccb09bdec938779651ee03e395758a6
|
| 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
|