A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 22:35 UTC
[Misc] Use dracut on CentOS and skip clone if repo exists for EP kernel installation (#21635)
Signed-off-by: Ming Yang <minos.future@gmail.com>
Ming Yang committed
Jul 30, 2025 at 13:15 UTC
f12d9256b39f058b93c201cedc7ffd9e605e9db8
2 files changed
+49
-3
tools/ep_kernels/configure_system_drivers.sh
+11
-1
@@ -2,6 +2,16 @@ set -ex
2
3
# turn on IBGDA
4
echo 'options nvidia NVreg_EnableStreamMemOPs=1 NVreg_RegistryDwords="PeerMappingOverride=1;"' | tee -a /etc/modprobe.d/nvidia.conf
5
-update-initramfs -u
5
+
6
+if command -v update-initramfs &> /dev/null; then
7
+ # for Debian/Ubuntu
8
+ sudo update-initramfs -u
9
+elif command -v dracut &> /dev/null; then
10
+ # for Fedora/CentOS
11
+ sudo dracut --force
12
+else
13
+ echo "No supported initramfs update tool found."
14
+ exit 1
15
+fi
16
17
echo "Please reboot the system to apply the changes"
tools/ep_kernels/install_python_libraries.sh
+38
-2
@@ -53,9 +53,45 @@ popd
53
54
export CMAKE_PREFIX_PATH=$WORKSPACE/nvshmem_install:$CMAKE_PREFIX_PATH
55
56
+is_git_dirty() {
57
+ local dir=$1
58
+ pushd "$dir" > /dev/null
59
+
60
+ if [ -d ".git" ] && [ -n "$(git status --porcelain 2>/dev/null)" ]; then
61
+ popd > /dev/null
62
+ return 0 # dirty (true)
63
+ else
64
+ popd > /dev/null
65
+ return 1 # clean (false)
66
+ fi
67
+}
68
+
69
+# Function to handle git repository cloning with dirty/incomplete checks
70
+clone_repo() {
71
+ local repo_url=$1
72
+ local dir_name=$2
73
+ local key_file=$3
74
+
75
+ if [ -d "$dir_name" ]; then
76
+ # Check if directory has uncommitted changes (dirty)
77
+ if is_git_dirty "$dir_name"; then
78
+ echo "$dir_name directory is dirty, skipping clone"
79
+ # Check if clone failed (directory exists but not a valid git repo or missing key files)
80
+ elif [ ! -d "$dir_name/.git" ] || [ ! -f "$dir_name/$key_file" ]; then
81
+ echo "$dir_name directory exists but clone appears incomplete, cleaning up and re-cloning"
82
+ rm -rf "$dir_name"
83
+ git clone "$repo_url"
84
+ else
85
+ echo "$dir_name directory exists and appears complete; manually update if needed"
86
+ fi
87
+ else
88
+ git clone "$repo_url"
89
+ fi
90
+}
91
+
92
# build and install pplx, require pytorch installed
93
pushd $WORKSPACE
58
-git clone https://github.com/ppl-ai/pplx-kernels
94
+clone_repo "https://github.com/ppl-ai/pplx-kernels" "pplx-kernels" "setup.py"
95
cd pplx-kernels
96
# see https://github.com/pypa/pip/issues/9955#issuecomment-838065925
97
# PIP_NO_BUILD_ISOLATION=0 disables build isolation
@@ -64,7 +100,7 @@ popd
100
101
# build and install deepep, require pytorch installed
102
pushd $WORKSPACE
67
-git clone https://github.com/deepseek-ai/DeepEP
103
+clone_repo "https://github.com/deepseek-ai/DeepEP" "DeepEP" "setup.py"
104
cd DeepEP
105
export NVSHMEM_DIR=$WORKSPACE/nvshmem_install
106
PIP_NO_BUILD_ISOLATION=0 pip install -vvv -e .