From b08bf2725f342354517c3d191e45cc4ebd9efcc4 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Thu, 23 Jul 2026 19:11:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20deps/=20=E4=BB=8E=20ARM64=20=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=A2=84=E4=B8=8B=E8=BD=BD=20cp310=20wheel=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=BE=9D=E8=B5=96=20Windows=20pip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + scripts/package.sh | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2443978..424449f 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ dataset/ __pycache__/ managerd.db assets-import.tar.gz +deps/ diff --git a/scripts/package.sh b/scripts/package.sh index 37d83cc..1065190 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -77,11 +77,12 @@ fi # ── 离线 Python 依赖 ── echo "[6/7] 离线 Python 依赖..." mkdir -p "$BUILD_DIR/deps" -# 尝试下载 onnxruntime ARM64 wheel(离线安装用) -if command -v pip3 &>/dev/null; then - pip3 download onnxruntime numpy --platform linux_aarch64 --platform manylinux2014_aarch64 --only-binary=:all: --python-version 3.10 -d "$BUILD_DIR/deps/" 2>/dev/null && echo " ✓ ARM64 wheels" || echo " ⚠ pip download 失败,跳过" +if [ -d "$PROJECT_DIR/deps" ] && ls "$PROJECT_DIR/deps"/*.whl >/dev/null 2>&1; then + cp "$PROJECT_DIR/deps"/*.whl "$BUILD_DIR/deps/" 2>/dev/null + echo " ✓ $(ls "$BUILD_DIR/deps/" | wc -l) 个 wheel" else - echo " ⚠ pip3 不可用,跳过" + echo " ⚠ deps/ 目录为空,请先在 ARM64 设备上运行: pip3 download onnxruntime numpy -d /tmp/deps" + echo " 然后复制到项目的 deps/ 目录" fi # ── README ──