[CI] Rewrite killall_sglang as Python with CI/local dual mode (#21331)
Co-authored-by: Alison Shao <alison.shao@mac.lan> Co-authored-by: Alison Shao <alison.shao@MacBook-Pro-D2W773R9CD.local> Co-authored-by: hnyls2002 <lsyincs@gmail.com> Co-authored-by: Liangsheng Yin <hnyls2002@gmail.com>
This commit is contained in:
co-authored by
Alison Shao
Alison Shao
hnyls2002
Liangsheng Yin
parent
6cc5717e8a
commit
5297a3cb46
@@ -84,9 +84,16 @@ mark_step_done "Host / runner detection"
|
||||
# Kill existing processes
|
||||
# ------------------------------------------------------------------------------
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
bash "${SCRIPT_DIR}/../../killall_sglang.sh"
|
||||
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
||||
python3 "${REPO_ROOT}/python/sglang/cli/killall.py"
|
||||
KILLALL_EXIT=$?
|
||||
echo "CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-}"
|
||||
|
||||
if [ $KILLALL_EXIT -ne 0 ]; then
|
||||
echo "ERROR: killall.py detected uncleanable GPU memory. Aborting CI."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mark_step_done "Kill existing processes"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# DEPRECATED: This script will be migrated to python/sglang/cli/killall.py.
|
||||
# CI mode is already handled there. This script remains for local/non-CI usage.
|
||||
#
|
||||
# TODO: Migrate remaining modes (rocm, all, gpus) to killall.py and remove this file.
|
||||
#
|
||||
# Usage:
|
||||
# ./killall_sglang.sh - Kill SGLang processes only (NVIDIA mode)
|
||||
# ./killall_sglang.sh rocm - Kill SGLang processes only (ROCm mode)
|
||||
|
||||
Reference in New Issue
Block a user