Skip to content

Commit 9bb41cb

Browse files
committed
fix(ascend): preserve validated triton runtime
1 parent 7f85a1f commit 9bb41cb

4 files changed

Lines changed: 24 additions & 13 deletions

File tree

.github/configs/ascend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ image_build:
6161
dockerfile: docker/ascend/Dockerfile.inference
6262
image: flagos-dev/flagscale-inference
6363
test_roles: [inference]
64-
base_image: harbor.baai.ac.cn/flagscale/vllm-plugin-fl@sha256:5062ac23b8b8247e5b4faa5d2c61b7b8e82e46a9ae7c55fe15c5cdbe3533f4b7
64+
base_image: harbor.baai.ac.cn/flagos-dev/flagscale:manual-20260812-ascend-dev-inference@sha256:e5b8e3b2c37584f980dffa1c08649b44e9edd2415522e123502e8d82a7854ef1
6565
build_args: {}
6666
source_refs:
6767
VLLM_PLUGIN_FL_REF: vllm_plugin_fl

docker/ascend/Dockerfile.inference

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# The immutable base supplies the matching Ascend vLLM runtime. FlagScale
16-
# overlays the resolved vllm-plugin-FL and FlagGems revisions.
17-
ARG BASE_IMAGE=harbor.baai.ac.cn/flagscale/vllm-plugin-fl@sha256:5062ac23b8b8247e5b4faa5d2c61b7b8e82e46a9ae7c55fe15c5cdbe3533f4b7
15+
# The immutable base owns the matching Ascend vLLM, FlagTree and Triton runtime.
16+
# FlagScale only overlays the resolved vllm-plugin-FL and FlagGems revisions.
17+
ARG BASE_IMAGE=harbor.baai.ac.cn/flagos-dev/flagscale:manual-20260812-ascend-dev-inference@sha256:e5b8e3b2c37584f980dffa1c08649b44e9edd2415522e123502e8d82a7854ef1
1818

1919
FROM ${BASE_IMAGE} AS dev
2020

requirements/ascend/serve.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Ascend serve-specific dependencies. The immutable inference image owns the
16-
# Python and vLLM dependency closure, so this file must not include base.txt or
17-
# resolve transitive packages that can replace the vendor-tested runtime.
15+
# The immutable inference image owns the complete Python, vLLM, FlagTree and
16+
# Triton dependency closure. Installing FlagTree over that image would replace
17+
# files in the shared triton namespace and invalidate the tested compiler stack.
1818

19-
# FlagTree for Ascend (extra index so PyPI remains available for build deps)
20-
# [--extra-index-url https://resource.flagos.net/repository/flagos-pypi-hosted/simple]
19+
# Keep the ascend-serve packaging extra explicit. The image installer validates
20+
# this base-owned package instead of reinstalling it.
2121
# [--no-deps]
2222
flagtree==0.4.0+ascend3.2

tools/install/ascend/install_serve.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ RETRY_COUNT="${FLAGSCALE_RETRY_COUNT:-3}"
2828
FLAGSCALE_HOME="${FLAGSCALE_HOME:-/opt/flagscale}"
2929
FLAGSCALE_DEPS="${FLAGSCALE_DEPS:-$FLAGSCALE_HOME/deps}"
3030
REQ_FILE="$PROJECT_ROOT/requirements/ascend/serve.txt"
31+
EXPECTED_FLAGTREE_VERSION="0.4.0+ascend3.2"
3132
FLAGGEMS_REPO="${FLAGSCALE_FLAGGEMS_REPO:-https://github.com/flagos-ai/FlagGems.git}"
3233
FLAGGEMS_REF="${FLAGSCALE_FLAGGEMS_REF:-v5.3.0}"
3334
VLLM_PLUGIN_REPO="${FLAGSCALE_VLLM_PLUGIN_REPO:-https://github.com/flagos-ai/vllm-plugin-FL.git}"
@@ -45,10 +46,20 @@ done
4546
install_pip() {
4647
if is_phase_enabled task; then
4748
[ ! -f "$REQ_FILE" ] && { log_info "serve.txt not found"; return 0; }
48-
set_step "Installing serve requirements"
49-
retry_pip_install -d $DEBUG "$REQ_FILE" "$RETRY_COUNT" || return 1
50-
[ "$DEBUG" = true ] || python -m pip show flagtree >/dev/null || return 1
51-
log_success "Serve requirements installed"
49+
set_step "Validating base-owned Ascend serve runtime"
50+
if [ "$DEBUG" != true ]; then
51+
EXPECTED_FLAGTREE_VERSION="$EXPECTED_FLAGTREE_VERSION" python - <<'PY' || return 1
52+
import importlib.metadata as metadata
53+
import os
54+
55+
expected = os.environ["EXPECTED_FLAGTREE_VERSION"]
56+
actual = metadata.version("flagtree")
57+
assert actual == expected, f"FlagTree version mismatch: expected {expected}, found {actual}"
58+
59+
import triton # noqa: F401, E402
60+
PY
61+
fi
62+
log_success "Ascend serve runtime validated"
5263
else
5364
local pkgs=$(get_pip_deps_for_requirements "$REQ_FILE")
5465
[ -z "$pkgs" ] && return 0

0 commit comments

Comments
 (0)