Daniel-F commited on
Commit
e0fcc82
·
1 Parent(s): ee0959b

Replace bloated requirements with minimal dependencies

Browse files

The 400+ package requirements_manual.txt included packages like av
that need system libraries (FFmpeg) and aren't used by the app.
Install only the actually needed packages instead.

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ def setup_deps():
27
  run("pip install 'setuptools<81'") # pin setuptools to keep pkg_resources available
28
  run("pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu")
29
  run("pip install -e .", cwd="segment-anything-2")
30
- run("pip install --no-deps -r requirements_manual.txt")
31
  run("git lfs install && git lfs pull", cwd=".") # assuming checkpoints/mouse_yolo.pt is tracked
32
 
33
  # Relaunch the script with an env flag to avoid looping
 
27
  run("pip install 'setuptools<81'") # pin setuptools to keep pkg_resources available
28
  run("pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu")
29
  run("pip install -e .", cwd="segment-anything-2")
30
+ run("pip install gradio opencv-python-headless ultralytics matplotlib")
31
  run("git lfs install && git lfs pull", cwd=".") # assuming checkpoints/mouse_yolo.pt is tracked
32
 
33
  # Relaunch the script with an env flag to avoid looping