mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-16 06:15:02 +08:00
[CI/Build] allow user modify pplx and deepep ref by ENV or command line (#29131)
Signed-off-by: alec-flowers <aflowers@nvidia.com>
This commit is contained in:
parent
e603129505
commit
c4c0354eec
@ -244,9 +244,15 @@ RUN mkdir -p /tmp/deepgemm/dist && touch /tmp/deepgemm/dist/.deepgemm_skipped
|
|||||||
|
|
||||||
COPY tools/ep_kernels/install_python_libraries.sh /tmp/install_python_libraries.sh
|
COPY tools/ep_kernels/install_python_libraries.sh /tmp/install_python_libraries.sh
|
||||||
# Install EP kernels(pplx-kernels and DeepEP)
|
# Install EP kernels(pplx-kernels and DeepEP)
|
||||||
|
ARG PPLX_COMMIT_HASH
|
||||||
|
ARG DEEPEP_COMMIT_HASH
|
||||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
export TORCH_CUDA_ARCH_LIST='9.0a 10.0a' && \
|
export TORCH_CUDA_ARCH_LIST='9.0a 10.0a' && \
|
||||||
/tmp/install_python_libraries.sh /tmp/ep_kernels_workspace wheel && \
|
/tmp/install_python_libraries.sh \
|
||||||
|
--workspace /tmp/ep_kernels_workspace \
|
||||||
|
--mode wheel \
|
||||||
|
${PPLX_COMMIT_HASH:+--pplx-ref "$PPLX_COMMIT_HASH"} \
|
||||||
|
${DEEPEP_COMMIT_HASH:+--deepep-ref "$DEEPEP_COMMIT_HASH"} && \
|
||||||
find /tmp/ep_kernels_workspace/nvshmem -name '*.a' -delete
|
find /tmp/ep_kernels_workspace/nvshmem -name '*.a' -delete
|
||||||
|
|
||||||
# Check the size of the wheel if RUN_WHEEL_CHECK is true
|
# Check the size of the wheel if RUN_WHEEL_CHECK is true
|
||||||
|
|||||||
@ -1,22 +1,68 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# usage: ./build.sh [workspace_dir] [mode]
|
# usage: ./install_python_libraries.sh [options]
|
||||||
# mode: "install" (default) → install directly into current Python env
|
# --workspace <dir> workspace directory (default: ./ep_kernels_workspace)
|
||||||
# "wheel" → build wheels into WORKSPACE/dist
|
# --mode <mode> "install" (default) or "wheel"
|
||||||
|
# --pplx-ref <commit> pplx-kernels commit hash
|
||||||
|
# --deepep-ref <commit> DeepEP commit hash
|
||||||
|
|
||||||
|
CUDA_HOME=${CUDA_HOME:-/usr/local/cuda}
|
||||||
|
PPLX_COMMIT_HASH=${PPLX_COMMIT_HASH:-"12cecfd"}
|
||||||
|
DEEPEP_COMMIT_HASH=${DEEPEP_COMMIT_HASH:-"73b6ea4"}
|
||||||
|
NVSHMEM_VER=3.3.9
|
||||||
|
WORKSPACE=${WORKSPACE:-$(pwd)/ep_kernels_workspace}
|
||||||
|
MODE=${MODE:-install}
|
||||||
|
|
||||||
|
# Parse arguments
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case $1 in
|
||||||
|
--workspace)
|
||||||
|
if [[ -z "$2" || "$2" =~ ^- ]]; then
|
||||||
|
echo "Error: --workspace requires an argument." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
WORKSPACE="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--mode)
|
||||||
|
if [[ -z "$2" || "$2" =~ ^- ]]; then
|
||||||
|
echo "Error: --mode requires an argument." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
MODE="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--pplx-ref)
|
||||||
|
if [[ -z "$2" || "$2" =~ ^- ]]; then
|
||||||
|
echo "Error: --pplx-ref requires an argument." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
PPLX_COMMIT_HASH="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--deepep-ref)
|
||||||
|
if [[ -z "$2" || "$2" =~ ^- ]]; then
|
||||||
|
echo "Error: --deepep-ref requires an argument." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
DEEPEP_COMMIT_HASH="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: Unknown argument '$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
WORKSPACE=${1:-$(pwd)/ep_kernels_workspace}
|
|
||||||
MODE=${2:-install}
|
|
||||||
mkdir -p "$WORKSPACE"
|
mkdir -p "$WORKSPACE"
|
||||||
|
|
||||||
WHEEL_DIR="$WORKSPACE/dist"
|
WHEEL_DIR="$WORKSPACE/dist"
|
||||||
mkdir -p "$WHEEL_DIR"
|
mkdir -p "$WHEEL_DIR"
|
||||||
NVSHMEM_VER=3.3.9
|
|
||||||
|
|
||||||
pushd "$WORKSPACE"
|
pushd "$WORKSPACE"
|
||||||
|
|
||||||
CUDA_HOME=${CUDA_HOME:-/usr/local/cuda}
|
|
||||||
|
|
||||||
# install dependencies if not installed
|
# install dependencies if not installed
|
||||||
if [ -z "$VIRTUAL_ENV" ]; then
|
if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
uv pip install --system cmake torch ninja
|
uv pip install --system cmake torch ninja
|
||||||
@ -133,7 +179,7 @@ do_build \
|
|||||||
"https://github.com/ppl-ai/pplx-kernels" \
|
"https://github.com/ppl-ai/pplx-kernels" \
|
||||||
"pplx-kernels" \
|
"pplx-kernels" \
|
||||||
"setup.py" \
|
"setup.py" \
|
||||||
"12cecfd" \
|
"$PPLX_COMMIT_HASH" \
|
||||||
""
|
""
|
||||||
|
|
||||||
# build DeepEP
|
# build DeepEP
|
||||||
@ -141,7 +187,7 @@ do_build \
|
|||||||
"https://github.com/deepseek-ai/DeepEP" \
|
"https://github.com/deepseek-ai/DeepEP" \
|
||||||
"DeepEP" \
|
"DeepEP" \
|
||||||
"setup.py" \
|
"setup.py" \
|
||||||
"73b6ea4" \
|
"$DEEPEP_COMMIT_HASH" \
|
||||||
"export NVSHMEM_DIR=$WORKSPACE/nvshmem; "
|
"export NVSHMEM_DIR=$WORKSPACE/nvshmem; "
|
||||||
|
|
||||||
if [ "$MODE" = "wheel" ]; then
|
if [ "$MODE" = "wheel" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user