Skip to content
22 changes: 22 additions & 0 deletions .github/scripts/ascend/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,43 @@
# Setup script for Ascend NPU CI environment.
set -euo pipefail

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install FlagGems for test purpose

FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main
pip install --no-build-isolation -e ${FLAGGEMS_VLLM_DIR}

Install vLLM-Plugin-FL

# Install FlagGems-vllm for test purpose
FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
rm -rf "${FLAGGEMS_VLLM_DIR}"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git clone --branch ${FLAGGEMS_VERSION} --depth 1 https://github.com/flagos-ai/FlagGems /workspace/FlagGems

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git clone --branch ${FLAGGEMS_VERSION} --depth 1 https://github.com/flagos-ai/FlagGems /workspace/FlagGems

python -m pip install --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}"

git config --global --add safe.directory "$(pwd)"

pip install --upgrade pip "setuptools>=77.0.3"

# Install vLLM-Plugin-FL
pip install \
--no-build-isolation \
--no-deps \
-e .

python - <<'PY'
import flag_gems
import flaggems_vllm
import numpy
import torch
import torch_npu # noqa: F401
import vllm
import vllm_fl

expected = "1.26.4"
if numpy.__version__ != expected:
raise RuntimeError(
f"Unexpected NumPy version: {numpy.__version__}; expected {expected}"
)
print(f"NumPy version: {numpy.__version__}")
print(f"vLLM import ok: {vllm.__version__}")
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")
print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}")
print(f"Torch import ok: {torch.__version__}")
print(f"Accelerator available: {torch.npu.is_available()}")
print(f"Accelerator count: {torch.npu.device_count()}")
PY
25 changes: 25 additions & 0 deletions .github/scripts/cuda/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,32 @@
# Setup script for CUDA CI environment.
set -euo pipefail

# Install FlagGems-vllm for test purpose
FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
rm -rf "${FLAGGEMS_VLLM_DIR}"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main
uv pip install --system --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}"

git config --global --add safe.directory "$(pwd)"

uv pip install --system --upgrade pip

# Install vLLM-Plugin-FL
uv pip install --system --no-build-isolation -e ".[test]"

python - <<'PY'
import flag_gems
import flaggems_vllm
import torch
import vllm
import vllm_fl

print(f"vLLM import ok: {vllm.__version__}")
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")
print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}")
print(f"Torch import ok: {torch.__version__}")
print(f"Accelerator available: {torch.cuda.is_available()}")
print(f"Accelerator count: {torch.cuda.device_count()}")
PY
12 changes: 11 additions & 1 deletion .github/scripts/enflame/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# Setup script for Enflame S60 CI.
set -euo pipefail

# Install FlagGems-vllm for test purpose
FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
rm -rf "${FLAGGEMS_VLLM_DIR}"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main
python -m pip install --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}"

: "${VLLM_PLUGINS:?VLLM_PLUGINS is not set}"
: "${TOPS_VISIBLE_DEVICES:?TOPS_VISIBLE_DEVICES is not set}"

Expand All @@ -20,11 +27,13 @@ if [[ -n "${GITHUB_ENV:-}" ]]; then
done
fi

# The vendor runtime, vLLM, and FlagGems come from the pinned base image.
# Install vLLM-Plugin-FL
# The vendor runtime and vLLM come from the pinned base image.
python -m pip install --no-build-isolation --no-deps -e .

python - <<'PY'
import flag_gems
import flaggems_vllm
import torch
import torch_gcu # noqa: F401
import vllm
Expand All @@ -33,6 +42,7 @@ import vllm_fl
print(f"vLLM import ok: {vllm.__version__}")
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import flag_gems
import flaggems_vllm

need to check flaggems_vllm

print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}")
print(f"FlagGems vendor: {getattr(flag_gems, 'vendor_name', 'auto-detected')}")
print(f"Torch import ok: {torch.__version__}")
print(f"Accelerator available: {torch.gcu.is_available()}")
Expand Down
10 changes: 10 additions & 0 deletions .github/scripts/hygon/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# Setup script for Hygon DCU CI environment.
set -euo pipefail

# Install FlagGems-vllm for test purpose
FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
rm -rf "${FLAGGEMS_VLLM_DIR}"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main
python -m pip install --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}"

git config --global --add safe.directory "$(pwd)"

: "${GEMS_VENDOR:?GEMS_VENDOR is not set}"
Expand All @@ -23,17 +30,20 @@ echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
test -e "${HIP_PATH}/lib/libgalaxyhip.so.5"
test -e "${DTK_HOME}/llvm/lib/libomp.so"

# Install vLLM-Plugin-FL
python -m pip install --no-build-isolation --no-deps -e .

python - <<'PY'
import flag_gems
import flaggems_vllm
import torch
import vllm
import vllm_fl

print(f"vLLM import ok: {vllm.__version__}")
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")
print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}")
print(f"Torch import ok: {torch.__version__}")
print(f"Accelerator available: {torch.cuda.is_available()}")
print(f"Accelerator count: {torch.cuda.device_count()}")
Expand Down
12 changes: 11 additions & 1 deletion .github/scripts/metax/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# Setup script for MetaX C550 CI environment.
set -euo pipefail

# Install FlagGems-vllm for test purpose
FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
rm -rf "${FLAGGEMS_VLLM_DIR}"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main
python -m pip install --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}"

export PATH="/opt/conda/bin:${PATH}"

: "${GEMS_VENDOR:?GEMS_VENDOR is not set}"
Expand All @@ -21,19 +28,22 @@ if [[ -n "${GITHUB_ENV:-}" ]]; then
done
fi

# vLLM, FlagGems, and test dependencies are provided by the CI image.
# Install vLLM-Plugin-FL
# vLLM and test dependencies are provided by the CI image.
# Only install the checked-out plugin source for this workflow run.
python -m pip install --no-build-isolation --no-deps -e .

python - <<'PY'
import flag_gems
import flaggems_vllm
import torch
import vllm
import vllm_fl

print(f"vLLM import ok: {vllm.__version__}")
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")
print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}")
print(f"Torch import ok: {torch.__version__}")
print(f"Accelerator available: {torch.cuda.is_available()}")
print(f"Accelerator count: {torch.cuda.device_count()}")
Expand Down
10 changes: 10 additions & 0 deletions .github/scripts/musa/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@
# Setup script for Moore Threads MUSA CI environment.
set -euo pipefail

# Install FlagGems-vllm for test purpose
FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
rm -rf "${FLAGGEMS_VLLM_DIR}"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main
python -m pip install --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}"

git config --global --add safe.directory "$(pwd)"

: "${GEMS_VENDOR:?GEMS_VENDOR is not set}"
: "${VLLM_PLUGINS:?VLLM_PLUGINS is not set}"
: "${MTHREADS_VISIBLE_DEVICES:?MTHREADS_VISIBLE_DEVICES is not set}"

# Install vLLM-Plugin-FL
python -m pip install --no-build-isolation --no-deps -e .

python - <<'PY'
import flag_gems
import flaggems_vllm
import torch
import torch_musa
import vllm
Expand All @@ -26,6 +35,7 @@ assert current_platform.device_type == "musa", current_platform.device_type
print(f"vLLM import ok: {vllm.__version__}")
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")
print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}")
print(f"Torch import ok: {torch.__version__}")
print(f"MUSA available: {torch.musa.is_available()}")
print(f"MUSA devices: {torch.musa.device_count()}")
Expand Down
Loading