@@ -34,6 +34,22 @@ check_conda_env() {
3434 log_info " Installing in conda environment: $CONDA_DEFAULT_ENV "
3535}
3636
37+ # Check sudo access
38+ check_sudo () {
39+ if ! sudo -n true 2> /dev/null; then
40+ log_error " This script requires passwordless sudo access for system packages"
41+ log_info " Run 'sudo -v' first, or configure passwordless sudo"
42+ exit 1
43+ fi
44+ }
45+
46+ # Install required system packages
47+ install_system_packages () {
48+ log_info " Installing required system packages..."
49+ sudo dnf install -y libibverbs rdma-core libmlx5 libibverbs-devel rdma-core-devel
50+ log_info " System packages installed successfully"
51+ }
52+
3753# Check wheels exist
3854check_wheels () {
3955 if [ ! -d " $WHEEL_DIR " ]; then
@@ -75,17 +91,25 @@ download_vllm_wheel() {
7591 fi
7692
7793 log_info " Downloading: $vllm_wheel_name "
94+
95+ # Save current directory and change to wheel directory
96+ local original_dir=$( pwd)
7897 cd " $WHEEL_DIR "
7998 gh release download " $RELEASE_TAG " --repo " $GITHUB_REPO " --pattern " *vllm*"
99+ local download_result=$?
100+
101+ # Always return to original directory
102+ cd " $original_dir "
80103
81- if [ $? -eq 0 ]; then
104+ if [ $download_result -eq 0 ]; then
82105 log_info " Successfully downloaded vLLM wheel"
83106 else
84107 log_error " Failed to download vLLM wheel"
85108 exit 1
86109 fi
87110}
88111
112+
89113main () {
90114 echo " Forge User Installation"
91115 echo " ======================"
@@ -95,7 +119,10 @@ main() {
95119 echo " "
96120
97121 check_conda_env
122+ check_sudo
98123 check_wheels
124+
125+ install_system_packages
99126 download_vllm_wheel
100127
101128 log_info " Installing PyTorch nightly..."
0 commit comments