[Build] Fix DeepEP CUDA driver stub linking (#50103)
Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: OpenAI Codex <codex@openai.com>
Kevin H. Luu committed
Jul 28, 2026 at 05:09 UTC
d2bfc6fe20343c638840c8867c29f7365fe23378
1 file changed
+15
tools/ep_kernels/install_python_libraries.sh
+15
@@ -197,6 +197,21 @@ do_build() {
197
#endif' csrc/kernels/backend/symmetric.hpp
198
fi
199
200
+ if [[ "$name" == "DeepEP" ]]; then
201
+ # DeepEP links against the CUDA driver API in driverless build images.
202
+ local cuda_driver_stub
203
+ local cuda_driver_stub_dir
204
+ cuda_driver_stub=$(
205
+ find -H "$CUDA_HOME" -path "*/stubs/libcuda.so" -print -quit
206
+ )
207
+ if [[ -z "$cuda_driver_stub" ]]; then
208
+ echo "CUDA driver stub not found under $CUDA_HOME" >&2
209
+ exit 1
210
+ fi
211
+ cuda_driver_stub_dir=$(dirname "$cuda_driver_stub")
212
+ export LIBRARY_PATH="${cuda_driver_stub_dir}${LIBRARY_PATH:+:$LIBRARY_PATH}"
213
+ fi
214
+
215
if [ "$MODE" = "install" ]; then
216
echo "Installing $name into environment"
217
eval "$extra_env" uv pip install --no-build-isolation -vvv .