Reorganize project layout and consolidate model assets

This commit is contained in:
xuwei 2026-03-13 22:22:53 +08:00
parent 8ff11d2863
commit b6a00b4438
15 changed files with 24 additions and 980 deletions

27
scripts/run_infer_cuda.sh Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "${REPO_ROOT}"
source "${REPO_ROOT}/.venv/bin/activate"
CUDA_LIBS="$(python - <<'PY'
import site, os, glob
dirs=[]
for p in site.getsitepackages():
dirs += glob.glob(os.path.join(p,"nvidia","*","lib"))
dirs=[d for d in dirs if os.path.isdir(d)]
seen=set(); out=[]
for d in dirs:
if d not in seen:
seen.add(d); out.append(d)
print(":".join(out))
PY
)"
export LD_LIBRARY_PATH="${CUDA_LIBS}:${LD_LIBRARY_PATH:-}"
exec python "${REPO_ROOT}/infer.py" "$@"