drozdgk commited on
Commit
b71073c
·
1 Parent(s): d1e677d

fix: install vendored detectron2 in postBuild (HF build order)

Browse files
Files changed (3) hide show
  1. packages.txt +1 -0
  2. postBuild +7 -0
  3. requirements.txt +3 -2
packages.txt CHANGED
@@ -1,3 +1,4 @@
1
  build-essential
2
  python3-dev
 
3
 
 
1
  build-essential
2
  python3-dev
3
+ ninja-build
4
 
postBuild ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ echo "[postBuild] Installing vendored detectron2 from MaskClustering/third_party/detectron2 ..."
5
+ pip install --no-cache-dir -e MaskClustering/third_party/detectron2
6
+
7
+
requirements.txt CHANGED
@@ -20,5 +20,6 @@ scipy
20
  onnxruntime
21
  gdown
22
 
23
- # Install detectron2 from vendored source (builds C++ extension detectron2._C)
24
- -e file:///app/MaskClustering/third_party/detectron2
 
 
20
  onnxruntime
21
  gdown
22
 
23
+ # NOTE (HF Spaces): do not use local-path installs here.
24
+ # HF builds install requirements BEFORE copying the repo into /app.
25
+ # detectron2 is installed from vendored source in `postBuild`.