bulatko commited on
Commit
57a7ef7
·
1 Parent(s): e2af809

Runtime fallback: install local detectron2 if import fails (no build isolation)

Browse files
Files changed (2) hide show
  1. mvp.py +1 -3
  2. requirements.txt +1 -10
mvp.py CHANGED
@@ -50,9 +50,7 @@ os.environ.setdefault("MAX_JOBS", "1")
50
  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
- 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:
 
50
  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
+
 
 
54
 
55
  # Ensure local detectron2 is installed at runtime if postBuild didn't run
56
  # try:
requirements.txt CHANGED
@@ -20,16 +20,7 @@ scipy
20
  onnxruntime
21
  gdown
22
  # detectron2 runtime deps (needed when importing vendored detectron2 via PYTHONPATH)
23
- fvcore>=0.1.5,<0.1.6
24
- iopath>=0.1.7,<0.1.10
25
- yacs>=0.1.8
26
- termcolor>=1.1
27
- tabulate
28
- cloudpickle
29
- tensorboard
30
- pycocotools>=2.0.2
31
- packaging
32
- black
33
 
34
  # NOTE (HF Spaces): do not use local-path installs here.
35
  # HF builds install requirements BEFORE copying the repo into /app.
 
20
  onnxruntime
21
  gdown
22
  # detectron2 runtime deps (needed when importing vendored detectron2 via PYTHONPATH)
23
+ git+https://github.com/facebookresearch/detectron2.git
 
 
 
 
 
 
 
 
 
24
 
25
  # NOTE (HF Spaces): do not use local-path installs here.
26
  # HF builds install requirements BEFORE copying the repo into /app.