Skip to content

Commit 6ac48b3

Browse files
committed
Reapply "leave install.sh as is for this PR"
This reverts commit 4ea74e8.
1 parent ca6b768 commit 6ac48b3

File tree

2 files changed

+89
-14
lines changed

2 files changed

+89
-14
lines changed

.github/packaging/vllm_reqs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# vLLM build to supplement a vLLM install from download.pytorch.org without
55
# resorting to --extra-index-url https://download.pytorch.org/whl/nightly to find
66
# vLLM dependencies (as this results in a ResolutionTooDeep error from pip).
7+
# See the file .github/workflows/gpu_test.yaml for an E2E forge installation using this approach.
78
# TODO: this should be done way less hackily
89
aiohappyeyeballs==2.6.1
910
aiohttp==3.13.0

scripts/install.sh

Lines changed: 88 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,85 @@ install_system_packages() {
124124
fi
125125
}
126126

127+
# Check to see if gh is installed, if not, it will be installed via conda-forge channel
128+
check_gh_install() {
129+
if ! command -v gh &> /dev/null; then
130+
log_warning "GitHub CLI (gh) not found. Installing via Conda..."
131+
conda install gh --channel conda-forge -y
132+
log_info "GitHub CLI (gh) installed successfully."
133+
log_info "Please run 'gh auth login' to authenticate with GitHub."
134+
else
135+
log_info "GitHub CLI (gh) already installed."
136+
fi
137+
}
138+
139+
# Check wheels exist
140+
check_wheels() {
141+
if [ ! -d "$WHEEL_DIR" ]; then
142+
log_error "Wheels directory not found: $WHEEL_DIR"
143+
exit 1
144+
fi
145+
146+
local wheel_count=$(ls -1 "$WHEEL_DIR"/*.whl 2>/dev/null | wc -l)
147+
log_info "Found $wheel_count local wheels"
148+
}
149+
150+
# Download vLLM wheel from GitHub releases
151+
download_vllm_wheel() {
152+
log_info "Downloading vLLM wheel from GitHub releases..."
153+
154+
# Check if gh is installed
155+
if ! command -v gh &> /dev/null; then
156+
log_error "GitHub CLI (gh) is required to download vLLM wheel"
157+
log_info "Install it with: sudo dnf install gh"
158+
log_info "Then run: gh auth login"
159+
exit 1
160+
fi
161+
162+
# Get the vLLM wheel filename from the release
163+
local vllm_wheel_name
164+
vllm_wheel_name=$(gh release view "$RELEASE_TAG" --repo "$GITHUB_REPO" --json assets --jq '.assets[] | select(.name | contains("vllm")) | .name' | head -1)
165+
166+
if [ -z "$vllm_wheel_name" ]; then
167+
log_error "Could not find vLLM wheel in release $RELEASE_TAG"
168+
log_info "Make sure the vLLM wheel has been uploaded to the GitHub release"
169+
exit 1
170+
fi
171+
for f in assets/wheels/vllm-*; do
172+
[ -e "$f" ] || continue # skip if glob didn't match
173+
if [ "$(basename "$f")" != "$vllm_wheel_name" ]; then
174+
log_info "Removing stale vLLM wheel: $(basename "$f")"
175+
rm -f "$f"
176+
fi
177+
done
178+
179+
local local_path="$WHEEL_DIR/$vllm_wheel_name"
180+
181+
if [ -f "$local_path" ]; then
182+
log_info "vLLM wheel already downloaded: $vllm_wheel_name"
183+
return 0
184+
fi
185+
186+
log_info "Downloading: $vllm_wheel_name"
187+
188+
# Save current directory and change to wheel directory
189+
local original_dir=$(pwd)
190+
cd "$WHEEL_DIR"
191+
gh release download "$RELEASE_TAG" --repo "$GITHUB_REPO" --pattern "*vllm*"
192+
local download_result=$?
193+
194+
# Always return to original directory
195+
cd "$original_dir"
196+
197+
if [ $download_result -eq 0 ]; then
198+
log_info "Successfully downloaded vLLM wheel"
199+
else
200+
log_error "Failed to download vLLM wheel"
201+
exit 1
202+
fi
203+
}
204+
205+
127206
# Parse command line arguments
128207
parse_args() {
129208
USE_SUDO=false
@@ -162,6 +241,7 @@ main() {
162241
echo "======================"
163242
echo ""
164243
echo "Note: Run this from the root of the forge repository"
244+
echo "This script requires GitHub CLI (gh) to download large wheels"
165245
if [ "$USE_SUDO" = "true" ]; then
166246
echo "System packages will be installed via system package manager (requires sudo)"
167247
check_sudo
@@ -171,29 +251,23 @@ main() {
171251
echo ""
172252

173253
check_conda_env
254+
check_wheels
174255

175256
# Install openssl as we overwrite the default version when we update LD_LIBRARY_PATH
176257
conda install -y openssl
177258

178259
install_system_packages "$USE_SUDO"
260+
check_gh_install
261+
download_vllm_wheel
179262

180263
log_info "Installing PyTorch nightly..."
181-
pip install torch==$PYTORCH_VERSION --index-url https://download.pytorch.org/whl/nightly/cu128
182-
183-
log_info "Installing torchtitan and torchstore..."
184-
pip install torchtitan torchstore
185-
186-
# Install Monarch from wheel at download.pytorch.org
187-
log_info "Downloading and installing Monarch wheel..."
188-
pip install -r https://raw.githubusercontent.com/meta-pytorch/monarch/main/requirements.txt
189-
pip install monarch --extra-index-url https://download.pytorch.org/whl/preview/forge
264+
pip install torch==$PYTORCH_VERSION --index-url https://download.pytorch.org/whl/nightly/cu129
190265

191-
# Install vLLM from wheel at download.pytorch.org
192-
log_info "Downloading and installing vLLM wheel..."
193-
pip install vllm --extra-index-url https://download.pytorch.org/whl/preview/forge
266+
log_info "Installing all wheels (local + downloaded)..."
267+
pip install "$WHEEL_DIR"/*.whl
194268

195269
log_info "Installing Forge from source..."
196-
pip install -e ".[dev]"
270+
pip install -e .
197271

198272
# Set up environment
199273
log_info "Setting up environment..."
@@ -213,7 +287,7 @@ main() {
213287
local cuda_activation_script="${conda_env_dir}/etc/conda/activate.d/cuda_env.sh"
214288
cat > "$cuda_activation_script" << 'EOF'
215289
# CUDA environment for Forge
216-
export CUDA_VERSION=12.8
290+
export CUDA_VERSION=12.9
217291
export NVCC=/usr/local/cuda-${CUDA_VERSION}/bin/nvcc
218292
export CUDA_NVCC_EXECUTABLE=/usr/local/cuda-${CUDA_VERSION}/bin/nvcc
219293
export CUDA_HOME=/usr/local/cuda-${CUDA_VERSION}

0 commit comments

Comments
 (0)