Upload root_scripts/reinstall_torch.sh with huggingface_hub
Browse files
root_scripts/reinstall_torch.sh
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -x
|
| 3 |
+
|
| 4 |
+
# Reinstall torch 2.6.0 (without upgrading flash_attn)
|
| 5 |
+
pip install torch==2.6.0 --no-deps \
|
| 6 |
+
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com \
|
| 7 |
+
2>&1 | tail -5
|
| 8 |
+
|
| 9 |
+
# Reinstall vllm 0.8.3 without deps (already has deps)
|
| 10 |
+
pip install vllm==0.8.3 --no-deps \
|
| 11 |
+
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com \
|
| 12 |
+
2>&1 | tail -5
|
| 13 |
+
|
| 14 |
+
# Reinstall verl 0.7.0
|
| 15 |
+
pip install verl==0.7.0 --no-deps \
|
| 16 |
+
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com \
|
| 17 |
+
2>&1 | tail -5
|
| 18 |
+
|
| 19 |
+
# Reinstall xformers for vllm
|
| 20 |
+
pip install xformers==0.0.29.post2 --no-deps \
|
| 21 |
+
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com \
|
| 22 |
+
2>&1 | tail -5
|
| 23 |
+
|
| 24 |
+
# Also need compatible NVIDIA packages for torch 2.6
|
| 25 |
+
pip install 'nvidia-cublas-cu12==12.4.5.8' 'nvidia-cudnn-cu12==9.1.0.70' 'nvidia-nccl-cu12==2.21.5' \
|
| 26 |
+
'nvidia-cusolver-cu12==11.6.1.9' 'nvidia-cusparse-cu12==12.3.1.170' \
|
| 27 |
+
'nvidia-cufft-cu12==11.2.1.3' 'nvidia-nvtx-cu12==12.4.127' \
|
| 28 |
+
'nvidia-nvjitlink-cu12==12.4.127' 'nvidia-cuda-runtime-cu12==12.4.127' \
|
| 29 |
+
'nvidia-cuda-cupti-cu12==12.4.127' 'nvidia-cuda-nvrtc-cu12==12.4.127' \
|
| 30 |
+
'triton==3.2.0' \
|
| 31 |
+
--no-deps \
|
| 32 |
+
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com \
|
| 33 |
+
2>&1 | tail -5
|
| 34 |
+
|
| 35 |
+
echo ""
|
| 36 |
+
echo "=== Verification ==="
|
| 37 |
+
python3 << 'PYEOF'
|
| 38 |
+
import torch
|
| 39 |
+
print(f"torch: {torch.__version__}")
|
| 40 |
+
print(f"CUDA: {torch.version.cuda}")
|
| 41 |
+
print(f"CXX11_ABI: {torch._C._GLIBCXX_USE_CXX11_ABI}")
|
| 42 |
+
|
| 43 |
+
try:
|
| 44 |
+
from flash_attn import flash_attn_func
|
| 45 |
+
import flash_attn
|
| 46 |
+
print(f"flash_attn: {flash_attn.__version__} - OK")
|
| 47 |
+
except Exception as e:
|
| 48 |
+
print(f"flash_attn ERROR: {e}")
|
| 49 |
+
|
| 50 |
+
import vllm
|
| 51 |
+
print(f"vLLM: {vllm.__version__}")
|
| 52 |
+
|
| 53 |
+
import transformers
|
| 54 |
+
print(f"transformers: {transformers.__version__}")
|
| 55 |
+
|
| 56 |
+
print("ALL_OK")
|
| 57 |
+
PYEOF
|
| 58 |
+
|
| 59 |
+
echo "REINSTALL_DONE"
|
| 60 |
+
|