Image-to-Image
TensorRT
rtx-5090
syncfix
File size: 1,325 Bytes
600294a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
set -euo pipefail
release_root=$(cd "$(dirname "$0")" && pwd)
runtime_venv=${1:-"$release_root/.venv"}
python_bin=${SYNCFIX_PYTHON:-python3.12}
if [ "$(uname -m)" != x86_64 ] || [ "$(uname -s)" != Linux ]; then
  echo 'Inference requires Linux x86_64. CPU-only verify.py works on other platforms.' >&2
  exit 1
fi
"$python_bin" -c 'import sys; assert sys.version_info[:2] == (3,12), "Use Python 3.12"'
"$python_bin" "$release_root/verify.py"
shopt -s nullglob
runtime_wheels=("$release_root"/runtime/*.whl)
if [ "${#runtime_wheels[@]}" -ne 1 ]; then
  echo 'The package must contain exactly one runtime wheel.' >&2
  exit 1
fi
if [ -e "$runtime_venv" ] && [ ! -f "$runtime_venv/pyvenv.cfg" ]; then
  echo 'Choose a new path or an existing Python virtual environment.' >&2
  exit 1
fi
if [ -f "$runtime_venv/pyvenv.cfg" ]; then
  "$runtime_venv/bin/python" -c 'import sys; assert sys.version_info[:2] == (3,12), "Choose a Python 3.12 virtual environment"'
else
  "$python_bin" -m venv "$runtime_venv"
fi
"$runtime_venv/bin/python" -m pip install -r "$release_root/requirements.txt"
"$runtime_venv/bin/python" -m pip install --no-deps --force-reinstall "${runtime_wheels[0]}"
echo "Installed runtime in $runtime_venv"
echo 'Install the documented TensorRT 11.3 runtime libraries, then run verify.py --run.'