feat: add yolov8n.pt to git, link /opt/vendor/yolov8 for pip deps

- Include yolov8n.pt model in repo (6.5MB)
- Add symlink logic in run_all.sh: if /workspace/.site-packages missing
  and /opt/vendor/yolov8 exists (EFS), auto-link before setting PYTHONPATH
This commit is contained in:
Bug 2026-05-07 14:49:20 +08:00
parent 322ad4a4b2
commit 8aaae2f323
3 changed files with 6 additions and 3 deletions

2
.gitignore vendored
View File

@ -13,5 +13,3 @@ __pycache__/
*.pyc
*.pyo
# YOLO model (auto-downloaded on first run)
yolov8n.pt

View File

@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
export PYTHONPATH="/workspace/.site-packages:$PYTHONPATH"
# Link pip deps from EFS vendor if /workspace/.site-packages is missing
if [[ ! -d "${ROOT}/.site-packages" && -d "/opt/vendor/yolov8" ]]; then
ln -sf /opt/vendor/yolov8 "${ROOT}/.site-packages"
fi
export PYTHONPATH="${ROOT}/.site-packages:$PYTHONPATH"
export DISPLAY=:1
# Auto-download YOLO model if not present

BIN
yolov8n.pt Normal file

Binary file not shown.