exefg commited on
Commit
403ff41
·
verified ·
1 Parent(s): 054ab6c

pixels decode + browser UA callbacks

Browse files
Files changed (1) hide show
  1. bootstrap-vision.sh +7 -7
bootstrap-vision.sh CHANGED
@@ -15,13 +15,13 @@ fail() {
15
  log "python=$(command -v python3 || true) $(python3 --version 2>/dev/null || true)"
16
  df -h / | tail -1 || true
17
 
18
- if [[ ! -f /opt/hypium-vision/worker/handler.py ]]; then
19
- apt-get update || fail "apt-get update"
20
- apt-get install -y --no-install-recommends git ffmpeg ca-certificates curl || fail "apt-get install"
21
- mkdir -p /opt/hypium-vision
22
- curl -fL --retry 5 "$SRC_URL" -o /tmp/vision-src.tgz || fail "download vision-src.tgz"
23
- tar -tzf /tmp/vision-src.tgz >/dev/null || fail "bad tarball"
24
- tar -xzf /tmp/vision-src.tgz -C /opt/hypium-vision || fail "extract tarball"
25
  pip install --no-cache-dir --break-system-packages setuptools wheel || fail "pip setuptools"
26
  pip install --no-cache-dir --break-system-packages --ignore-installed cryptography runpod==1.10.1 || fail "pip runpod"
27
  pip install --no-cache-dir --break-system-packages -e /opt/hypium-vision || fail "pip -e hypium-vision"
 
15
  log "python=$(command -v python3 || true) $(python3 --version 2>/dev/null || true)"
16
  df -h / | tail -1 || true
17
 
18
+ apt-get update || fail "apt-get update"
19
+ apt-get install -y --no-install-recommends git ffmpeg ca-certificates curl || fail "apt-get install"
20
+ mkdir -p /opt/hypium-vision
21
+ curl -fL --retry 5 "$SRC_URL" -o /tmp/vision-src.tgz || fail "download vision-src.tgz"
22
+ tar -xzf /tmp/vision-src.tgz -C /opt/hypium-vision || fail "extract tarball"
23
+ export PYTHONPATH=/opt/hypium-vision/src:/opt/hypium-vision/worker
24
+ if ! python3 -c "import runpod, rfdetr, hypium_vision" >/dev/null 2>&1; then
25
  pip install --no-cache-dir --break-system-packages setuptools wheel || fail "pip setuptools"
26
  pip install --no-cache-dir --break-system-packages --ignore-installed cryptography runpod==1.10.1 || fail "pip runpod"
27
  pip install --no-cache-dir --break-system-packages -e /opt/hypium-vision || fail "pip -e hypium-vision"