From cf127f9ff3b1af5d220253df3d2673c3c3bd2d18 Mon Sep 17 00:00:00 2001 From: zhulin1 Date: Tue, 4 Aug 2026 14:59:07 +0800 Subject: [PATCH 1/6] update --- .github/workflows/docker-inner.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-inner.yml b/.github/workflows/docker-inner.yml index 3a1e5da88c..3e99e464ac 100644 --- a/.github/workflows/docker-inner.yml +++ b/.github/workflows/docker-inner.yml @@ -3,6 +3,11 @@ name: publish-docker-inner on: workflow_dispatch: inputs: + repo_ref: + required: false + description: 'Set branch or tag or commit id. Default is "main"' + type: string + default: 'main' image_tag: required: true description: 'Set docker image tag. Default is "latest", you can also set "auto" to generate a formated tag, or input a manual tag' @@ -39,7 +44,9 @@ jobs: SCHEDULE_TAG: 'pt29_latest' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v6 + with: + ref: ${{ github.event.inputs.repo_ref || 'main' }} - name: Parse tag run: | if [[ "${GITHUB_EVENT_NAME}" == 'schedule' ]]; then From 27c613c2bd871200240f839a5add0ce94a291380 Mon Sep 17 00:00:00 2001 From: zhulin1 Date: Tue, 4 Aug 2026 16:59:12 +0800 Subject: [PATCH 2/6] update --- image_build.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/image_build.sh b/image_build.sh index 7fd3374feb..b8c396f336 100644 --- a/image_build.sh +++ b/image_build.sh @@ -12,8 +12,8 @@ export CAUSAL_CONV1D_URL=https://github.com/Dao-AILab/causal-conv1d@da6dbaa9fd5a export FLA_URL="${FLA_URL-https://github.com/HAOCHENYE/flash-linear-attention@tmp-tensor-cache}" export TORCH_VERSION=${TORCH_VERSION:-"2.9.1"} -# export LMDEPLOY_VERSION="0.13.0dev" -export LMDEPLOY_URL=https://github.com/InternLM/lmdeploy@efe3b88607756a7ad9411b89627b5ac6ebaa540e +export LMDEPLOY_VERSION="0.15.0" +# export LMDEPLOY_URL=https://github.com/InternLM/lmdeploy@efe3b88607756a7ad9411b89627b5ac6ebaa540e export PPA_SOURCE="https://mirrors.aliyun.com" export DEFAULT_PYPI_URL=${DEFAULT_PYPI_URL:-"https://mirrors.aliyun.com/pypi/simple"} # mirror https://download.pytorch.org/whl @@ -40,7 +40,8 @@ docker build . \ --build-arg DEEP_GEMM_URL=$DEEP_GEMM_URL \ --build-arg XTUNER_URL=$XTUNER_URL \ --build-arg XTUNER_COMMIT=$XTUNER_COMMIT \ - --build-arg LMDEPLOY_URL=$LMDEPLOY_URL \ + --build-arg LMDEPLOY_VERSION=$LMDEPLOY_VERSION \ + # --build-arg LMDEPLOY_URL=$LMDEPLOY_URL \ --progress=plain \ --label "BASE_IMAGE=$BASE_IMAGE" \ --label "XTUNER_URL=${XTUNER_URL/@/\/tree\/}" \ @@ -52,5 +53,5 @@ docker build . \ --label "FLA_URL=${FLA_URL/@/\/tree\/}" \ --label "DEEP_EP_URL=${DEEP_EP_URL/@/\/tree\/}" \ --label "DEEP_GEMM_URL=${DEEP_GEMM_URL/@/\/tree\/}" \ - --label "LMDEPLOY_URL=${LMDEPLOY_URL/@/\/tree\/}" - # --label "LMDEPLOY_VERSION=$LMDEPLOY_VERSION" + --label "LMDEPLOY_VERSION=$LMDEPLOY_VERSION" + # --label "LMDEPLOY_URL=${LMDEPLOY_URL/@/\/tree\/}" From c74efa768b2c76488c3cf99f810f69cf0ea7fe20 Mon Sep 17 00:00:00 2001 From: zhulin1 Date: Tue, 4 Aug 2026 17:41:01 +0800 Subject: [PATCH 3/6] update --- image_build.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/image_build.sh b/image_build.sh index b8c396f336..a1b0b37fe3 100644 --- a/image_build.sh +++ b/image_build.sh @@ -40,8 +40,7 @@ docker build . \ --build-arg DEEP_GEMM_URL=$DEEP_GEMM_URL \ --build-arg XTUNER_URL=$XTUNER_URL \ --build-arg XTUNER_COMMIT=$XTUNER_COMMIT \ - --build-arg LMDEPLOY_VERSION=$LMDEPLOY_VERSION \ - # --build-arg LMDEPLOY_URL=$LMDEPLOY_URL \ + --build-arg LMDEPLOY_URL=$LMDEPLOY_URL \ --progress=plain \ --label "BASE_IMAGE=$BASE_IMAGE" \ --label "XTUNER_URL=${XTUNER_URL/@/\/tree\/}" \ @@ -53,5 +52,4 @@ docker build . \ --label "FLA_URL=${FLA_URL/@/\/tree\/}" \ --label "DEEP_EP_URL=${DEEP_EP_URL/@/\/tree\/}" \ --label "DEEP_GEMM_URL=${DEEP_GEMM_URL/@/\/tree\/}" \ - --label "LMDEPLOY_VERSION=$LMDEPLOY_VERSION" - # --label "LMDEPLOY_URL=${LMDEPLOY_URL/@/\/tree\/}" + --label "LMDEPLOY_VERSION=${LMDEPLOY_VERSION/@/\/tree\/}" \ No newline at end of file From 4550462b7bdcdd1de147e234bdc660c43888032e Mon Sep 17 00:00:00 2001 From: zhulin1 Date: Tue, 4 Aug 2026 21:06:41 +0800 Subject: [PATCH 4/6] [CI] Pass LMDEPLOY_VERSION into docker image build Without this build-arg, Dockerfile falls through to git clone with an empty LMDEPLOY_URL and fails with "You must specify a repository to clone". --- image_build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/image_build.sh b/image_build.sh index a1b0b37fe3..5a83eae62d 100644 --- a/image_build.sh +++ b/image_build.sh @@ -40,6 +40,7 @@ docker build . \ --build-arg DEEP_GEMM_URL=$DEEP_GEMM_URL \ --build-arg XTUNER_URL=$XTUNER_URL \ --build-arg XTUNER_COMMIT=$XTUNER_COMMIT \ + --build-arg LMDEPLOY_VERSION=$LMDEPLOY_VERSION \ --build-arg LMDEPLOY_URL=$LMDEPLOY_URL \ --progress=plain \ --label "BASE_IMAGE=$BASE_IMAGE" \ From 940a869e32a0b56dd76dd7cdddff36c2ab2d3a1f Mon Sep 17 00:00:00 2001 From: zhulin1 Date: Wed, 5 Aug 2026 15:08:01 +0800 Subject: [PATCH 5/6] [CI] Align lmdeploy deps and dump runtime pip list Pin apache-tvm-ffi/transformers for lmdeploy compatibility, bump xgrammar, and print pip list after image build and before ETE train jobs. --- Dockerfile | 3 +-- autotest/module/train.py | 9 +++++++-- image_build.sh | 6 +++++- pyproject.toml | 3 ++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ffc708d4f3..c85b754e31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -222,9 +222,8 @@ RUN --mount=type=secret,id=HTTPS_PROXY,env=https_proxy \ pip install fastapi fire openai outlines \ pyzmq aiohttp cloudpickle prometheus_client protobuf numpy pillow einops tiktoken sentencepiece \ partial_json_parser 'ray[default]<3' shortuuid uvicorn pybase64 \ - tilelang==0.1.11 \ 'pydantic>2' openai_harmony dlblas --no-cache-dir -i ${DEFAULT_PYPI_URL} && \ - pip install xgrammar==0.1.32 timm!=1.0.23 --no-cache-dir -i ${DEFAULT_PYPI_URL} --no-deps && \ + pip install xgrammar>=0.1.33 timm!=1.0.23 --no-cache-dir -i ${DEFAULT_PYPI_URL} --no-deps && \ if [ -n "${LMDEPLOY_VERSION}" ]; then \ pip install lmdeploy==${LMDEPLOY_VERSION} --no-deps --no-cache-dir -i ${DEFAULT_PYPI_URL}; \ else \ diff --git a/autotest/module/train.py b/autotest/module/train.py index 1ed84bbacc..49da3162f3 100644 --- a/autotest/module/train.py +++ b/autotest/module/train.py @@ -33,6 +33,9 @@ def get_cmd(config): ) config["work_dir"] = work_dir + # Print runtime image package list before training for version diagnosis. + image_version_check = 'echo "===== runtime pip list ====="; pip list; ' + # this patch is for torch 2.9.1 Conv3d memory issue fix cudnn_patch = ( "TORCH_VERSION=$(python -c 'import torch;print(torch.__version__.split(chr(43))[0])'); " @@ -41,7 +44,8 @@ def get_cmd(config): if train_type == "sft": command = ( - f"cd {current_dir}; pwd; {pip_package}; export GITHUB_RUN_ID={config.get('run_id')}; export WORK_DIR={work_dir}; " + f"cd {current_dir}; pwd; {pip_package}; {image_version_check}" + f"export GITHUB_RUN_ID={config.get('run_id')}; export WORK_DIR={work_dir}; " + cudnn_patch + f"torchrun --nproc-per-node {nproc_per_node} --master_addr=${{MASTER_ADDR}} --master_port=${{MASTER_PORT}} --nnodes=${{WORLD_SIZE}} --node_rank=${{RANK}} " + f"xtuner/v1/train/cli/{train_type}.py" @@ -66,7 +70,8 @@ def get_cmd(config): infer_type = config.get("parameters", {}).get("infer_backend", "lmdeploy") accelerator = config.get("parameters", {}).get("accelerator", "GPU") command = ( - f"cd {current_dir}; pwd; {pip_package}; export GITHUB_RUN_ID={config.get('run_id')}; export WORK_DIR={work_dir}; " + f"cd {current_dir}; pwd; {pip_package}; {image_version_check}" + f"export GITHUB_RUN_ID={config.get('run_id')}; export WORK_DIR={work_dir}; " + cudnn_patch + f"bash -x autotest/utils/ci_run_rl.sh {accelerator} {infer_type} {config_path} ${{MODEL_PATH}} ${{DATA_PATH}} ${{EVAL_DATA_PATH}}" ) diff --git a/image_build.sh b/image_build.sh index 5a83eae62d..afc59e1a9a 100644 --- a/image_build.sh +++ b/image_build.sh @@ -53,4 +53,8 @@ docker build . \ --label "FLA_URL=${FLA_URL/@/\/tree\/}" \ --label "DEEP_EP_URL=${DEEP_EP_URL/@/\/tree\/}" \ --label "DEEP_GEMM_URL=${DEEP_GEMM_URL/@/\/tree\/}" \ - --label "LMDEPLOY_VERSION=${LMDEPLOY_VERSION/@/\/tree\/}" \ No newline at end of file + --label "LMDEPLOY_VERSION=${LMDEPLOY_VERSION/@/\/tree\/}" + +echo "===== pip list in ${image_name}:${image_tag} =====" +docker run --rm --entrypoint pip "${image_name}:${image_tag}" list + diff --git a/pyproject.toml b/pyproject.toml index 925ece2618..bb62f70004 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,9 +36,10 @@ dependencies = [ "SentencePiece", "tiktoken", "tilelang==0.1.11", + "apache-tvm-ffi==0.1.11", "torch>=2.6.0", "torchvision", - "transformers==5.2.0", + "transformers==5.14.1", "cyclopts", "transformers_stream_generator", "opencv-python-headless<=4.12.0.88", From 32f627c2b622b97d4d7558102669de39d0c59d83 Mon Sep 17 00:00:00 2001 From: zhulin1 Date: Thu, 6 Aug 2026 13:46:50 +0800 Subject: [PATCH 6/6] [CI] Install lmdeploy from RunningLeon fix-ray-mp-dup commit Pin LMDEPLOY_URL to c14f389e instead of PyPI 0.15.0 for docker image builds. --- image_build.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/image_build.sh b/image_build.sh index afc59e1a9a..23a0d5bb61 100644 --- a/image_build.sh +++ b/image_build.sh @@ -12,8 +12,8 @@ export CAUSAL_CONV1D_URL=https://github.com/Dao-AILab/causal-conv1d@da6dbaa9fd5a export FLA_URL="${FLA_URL-https://github.com/HAOCHENYE/flash-linear-attention@tmp-tensor-cache}" export TORCH_VERSION=${TORCH_VERSION:-"2.9.1"} -export LMDEPLOY_VERSION="0.15.0" -# export LMDEPLOY_URL=https://github.com/InternLM/lmdeploy@efe3b88607756a7ad9411b89627b5ac6ebaa540e +export LMDEPLOY_URL="${LMDEPLOY_URL:-https://github.com/RunningLeon/lmdeploy@c14f389e9b2346f9835954ed90aefc0a0aac7ad4}" +# export LMDEPLOY_VERSION="0.15.0" export PPA_SOURCE="https://mirrors.aliyun.com" export DEFAULT_PYPI_URL=${DEFAULT_PYPI_URL:-"https://mirrors.aliyun.com/pypi/simple"} # mirror https://download.pytorch.org/whl @@ -40,8 +40,7 @@ docker build . \ --build-arg DEEP_GEMM_URL=$DEEP_GEMM_URL \ --build-arg XTUNER_URL=$XTUNER_URL \ --build-arg XTUNER_COMMIT=$XTUNER_COMMIT \ - --build-arg LMDEPLOY_VERSION=$LMDEPLOY_VERSION \ - --build-arg LMDEPLOY_URL=$LMDEPLOY_URL \ + --build-arg LMDEPLOY_URL="$LMDEPLOY_URL" \ --progress=plain \ --label "BASE_IMAGE=$BASE_IMAGE" \ --label "XTUNER_URL=${XTUNER_URL/@/\/tree\/}" \ @@ -53,7 +52,7 @@ docker build . \ --label "FLA_URL=${FLA_URL/@/\/tree\/}" \ --label "DEEP_EP_URL=${DEEP_EP_URL/@/\/tree\/}" \ --label "DEEP_GEMM_URL=${DEEP_GEMM_URL/@/\/tree\/}" \ - --label "LMDEPLOY_VERSION=${LMDEPLOY_VERSION/@/\/tree\/}" + --label "LMDEPLOY_URL=${LMDEPLOY_URL/@/\/tree\/}" echo "===== pip list in ${image_name}:${image_tag} =====" docker run --rm --entrypoint pip "${image_name}:${image_tag}" list