Spaces:
Running on Zero
Running on Zero
Commit ·
bf45f22
1
Parent(s): 3f1cc74
test env
Browse files- app.py +8 -1
- scripts/check_packages.py +5 -0
app.py
CHANGED
|
@@ -8,7 +8,8 @@ from scripts.check_packages import (
|
|
| 8 |
install_flash_attn,
|
| 9 |
install_kaolin,
|
| 10 |
install_nvdiffrast,
|
| 11 |
-
install_sam2
|
|
|
|
| 12 |
)
|
| 13 |
|
| 14 |
# install flash-attn
|
|
@@ -35,6 +36,12 @@ try:
|
|
| 35 |
except ModuleNotFoundError:
|
| 36 |
install_sam2()
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
os.environ["GRADIO_TEMP_DIR"] = os.path.join(os.getcwd(), "gradio_temp")
|
| 39 |
os.makedirs(os.environ["GRADIO_TEMP_DIR"], exist_ok=True)
|
| 40 |
import uuid
|
|
|
|
| 8 |
install_flash_attn,
|
| 9 |
install_kaolin,
|
| 10 |
install_nvdiffrast,
|
| 11 |
+
install_sam2,
|
| 12 |
+
install_utils3d
|
| 13 |
)
|
| 14 |
|
| 15 |
# install flash-attn
|
|
|
|
| 36 |
except ModuleNotFoundError:
|
| 37 |
install_sam2()
|
| 38 |
|
| 39 |
+
# install utils3d
|
| 40 |
+
try:
|
| 41 |
+
import utils3d
|
| 42 |
+
except ModuleNotFoundError:
|
| 43 |
+
install_utils3d()
|
| 44 |
+
|
| 45 |
os.environ["GRADIO_TEMP_DIR"] = os.path.join(os.getcwd(), "gradio_temp")
|
| 46 |
os.makedirs(os.environ["GRADIO_TEMP_DIR"], exist_ok=True)
|
| 47 |
import uuid
|
scripts/check_packages.py
CHANGED
|
@@ -32,4 +32,9 @@ def install_mipsplatting():
|
|
| 32 |
def install_sam2():
|
| 33 |
print ("installing SAM 2...")
|
| 34 |
result = os.system('pip install git+https://github.com/facebookresearch/sam2.git --no-build-isolation')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
print (result)
|
|
|
|
| 32 |
def install_sam2():
|
| 33 |
print ("installing SAM 2...")
|
| 34 |
result = os.system('pip install git+https://github.com/facebookresearch/sam2.git --no-build-isolation')
|
| 35 |
+
print (result)
|
| 36 |
+
|
| 37 |
+
def install_utils3d():
|
| 38 |
+
print ("installing utils3d...")
|
| 39 |
+
result = os.system('pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8 --no-build-isolation')
|
| 40 |
print (result)
|