Initial commit
This commit is contained in:
commit
9469142d5b
5 changed files with 285 additions and 0 deletions
24
run_infer_cuda.sh
Executable file
24
run_infer_cuda.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
source .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 infer.py "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue