2024-12-31 11:04:01 +08:00
|
|
|
#!/bin/bash
|
2024-12-01 18:55:26 +08:00
|
|
|
# Install the dependency in CI.
|
2025-03-28 10:34:10 -07:00
|
|
|
set -euxo pipefail
|
2024-10-30 02:49:08 -07:00
|
|
|
|
2024-12-01 18:55:26 +08:00
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
bash "${SCRIPT_DIR}/killall_sglang.sh"
|
2024-11-30 00:24:30 -08:00
|
|
|
|
2025-05-11 10:55:06 -07:00
|
|
|
# Update pip
|
|
|
|
|
pip install --upgrade pip
|
|
|
|
|
|
2025-04-03 17:45:05 +08:00
|
|
|
# Clean up existing installations
|
2025-05-11 10:55:06 -07:00
|
|
|
pip uninstall -y flashinfer flashinfer_python sgl-kernel sglang vllm
|
2025-04-03 17:45:05 +08:00
|
|
|
pip cache purge
|
|
|
|
|
rm -rf /root/.cache/flashinfer
|
|
|
|
|
rm -rf /usr/local/lib/python3.10/dist-packages/flashinfer*
|
|
|
|
|
rm -rf /usr/local/lib/python3.10/dist-packages/sgl_kernel*
|
|
|
|
|
|
|
|
|
|
# Install the main package
|
2025-04-19 00:28:39 -07:00
|
|
|
pip install -e "python[all]"
|
2025-04-03 17:45:05 +08:00
|
|
|
|
|
|
|
|
# Install additional dependencies
|
2025-05-13 01:08:49 +08:00
|
|
|
pip install transformers==4.51.0 timm torchaudio==2.6.0 sentence_transformers accelerate peft pandas datasets mooncake-transfer-engine==0.3.0
|
2024-12-01 01:47:30 -08:00
|
|
|
|
2025-05-11 00:55:00 -04:00
|
|
|
# For compiling xgrammar kernels
|
2024-11-25 04:58:16 -08:00
|
|
|
pip install cuda-python nvidia-cuda-nvrtc-cu12
|
2025-04-25 12:53:53 +05:30
|
|
|
|
|
|
|
|
# For lmms_evals evaluating MMMU
|
|
|
|
|
git clone --branch v0.3.3 --depth 1 https://github.com/EvolvingLMMs-Lab/lmms-eval.git
|
|
|
|
|
pip install -e lmms-eval/
|
2025-05-06 01:32:02 +08:00
|
|
|
|
|
|
|
|
# Install FlashMLA for attention backend tests
|
|
|
|
|
pip install git+https://github.com/deepseek-ai/FlashMLA.git
|
2025-05-12 13:08:40 -07:00
|
|
|
|
|
|
|
|
# Install hf_xet
|
|
|
|
|
pip install huggingface_hub[hf_xet]
|