Runtime fallback: install local detectron2 if import fails (no build isolation)
Browse files
mvp.py
CHANGED
|
@@ -51,7 +51,8 @@ REPO_ROOT = os.path.dirname(os.path.abspath(__file__))
|
|
| 51 |
sys.path.append(os.path.join(REPO_ROOT, "vggt"))
|
| 52 |
MK_PATH = os.path.join(REPO_ROOT, "MaskClustering")
|
| 53 |
DETECTRON2_ROOT = os.path.join(REPO_ROOT, "MaskClustering", "third_party", "detectron2")
|
| 54 |
-
|
|
|
|
| 55 |
|
| 56 |
# Ensure local detectron2 is installed at runtime if postBuild didn't run
|
| 57 |
# try:
|
|
|
|
| 51 |
sys.path.append(os.path.join(REPO_ROOT, "vggt"))
|
| 52 |
MK_PATH = os.path.join(REPO_ROOT, "MaskClustering")
|
| 53 |
DETECTRON2_ROOT = os.path.join(REPO_ROOT, "MaskClustering", "third_party", "detectron2")
|
| 54 |
+
THIRD_PARTY_ROOT = os.path.join(REPO_ROOT, "MaskClustering", "third_party")
|
| 55 |
+
os.environ["PYTHONPATH"] = os.environ.get("PYTHONPATH", "") + ":" + THIRD_PARTY_ROOT + ":" + DETECTRON2_ROOT
|
| 56 |
|
| 57 |
# Ensure local detectron2 is installed at runtime if postBuild didn't run
|
| 58 |
# try:
|