From b86a121d6dad73852e33f9267316d639e2056f0d Mon Sep 17 00:00:00 2001 From: dylan Date: Fri, 7 Aug 2026 06:20:02 +0000 Subject: [PATCH] =?UTF-8?q?fix(critical):=20patch=5Fops.sh=20cwd=20bug=20?= =?UTF-8?q?=E2=80=94=20all=20cp/deploy=20./paths=20resolved=20against=20Do?= =?UTF-8?q?ckerfile=20WORKDIR=3D/workspace/=20instead=20of=20script=20dir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: patch_ops.sh uses relative paths (./api_server.py, ./reasoning/, etc.) but never cd's into its own directory. Dockerfile sets WORKDIR=/workspace/ and runs 'bash /workspace/qwen3_6_scripts/patch_ops.sh', so cwd=/workspace/ at execution time. Every 'cp ./xxx' and 'deploy ./xxx' silently fails because the files are at /workspace/qwen3_6_scripts/xxx, not /workspace/xxx. Without set -e, the script completes with exit 0, Docker build succeeds, but NO patches are actually applied. Result: the original vllm 0.6.3 api_server.py runs (no reasoning-parser support), sees --reasoning-parser qwen3 as unrecognized, and exits with argparse error. Fix: 1. cd "$(dirname "$0")" at script start → all ./paths resolve correctly 2. set -eo pipefail → any failed cp now fails the build immediately --- qwen3_6_scripts/patch_ops.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qwen3_6_scripts/patch_ops.sh b/qwen3_6_scripts/patch_ops.sh index 01e5f8b4..e52e21c0 100755 --- a/qwen3_6_scripts/patch_ops.sh +++ b/qwen3_6_scripts/patch_ops.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -eo pipefail # BI-V100 engine patches for Qwen3.6-35B-A3B (Qwen3_5 architecture) # # All modifications are FULL FILE REPLACEMENTS — no AST patch scripts. @@ -8,6 +9,11 @@ # Base image: git.modelhub.org.cn:9443/enginex-iluvatar/bi100-3.2.3-x86-ubuntu20.04-py3.10-poc-llm-infer:v1.2.3 # vllm install path: /usr/local/corex/lib/python3/dist-packages/vllm/ +# CRITICAL: cd into this script's directory so all ./relative paths work +# regardless of WORKDIR in Dockerfile or caller's cwd. +cd "$(dirname "$0")" +echo "[patch_ops] working directory: $(pwd)" + VLLM=/usr/local/corex/lib/python3/dist-packages/vllm VLLM64=/usr/local/corex/lib64/python3/dist-packages/vllm