diff --git a/.buildkite/scripts/upload-flashinfer-wheels.sh b/.buildkite/scripts/upload-flashinfer-wheels.sh index 495c20fec2e6e..2e98578b7b8e2 100755 --- a/.buildkite/scripts/upload-flashinfer-wheels.sh +++ b/.buildkite/scripts/upload-flashinfer-wheels.sh @@ -26,20 +26,33 @@ fi # Extract the version from the wheel version=$(unzip -p "$wheel" '**/METADATA' | grep '^Version: ' | cut -d' ' -f2) +wheel_name=$(basename "$wheel") echo "FlashInfer version: $version" # Upload the wheel to S3 under flashinfer directory aws s3 cp "$wheel" "s3://vllm-wheels/flashinfer/" -# Generate simple index.html for the package (following pip index pattern) -wheel_name=$(basename "$wheel") -cat > flashinfer_index.html << EOF +# Download existing index if it exists, then rebuild it with all wheels +echo "Rebuilding index with all available wheels..." +aws s3 ls s3://vllm-wheels/flashinfer/ --recursive | grep '\.whl$' | awk '{print $4}' | sed 's|flashinfer/||' > wheel_list.txt + +# Generate complete index.html for the package (following pip index pattern) +cat > flashinfer_index.html << 'EOF' Links for flashinfer-python

Links for flashinfer-python

-$wheel_name
+EOF + +# Add each wheel to the index +while IFS= read -r wheel_file; do + if [[ -n "$wheel_file" ]]; then + echo "$wheel_file
" >> flashinfer_index.html + fi +done < wheel_list.txt + +cat >> flashinfer_index.html << 'EOF' EOF @@ -47,6 +60,6 @@ EOF aws s3 cp flashinfer_index.html "s3://vllm-wheels/flashinfer/index.html" # Clean up -rm -f flashinfer_index.html +rm -f flashinfer_index.html wheel_list.txt echo "Successfully uploaded FlashInfer wheel $wheel_name (version $version)" \ No newline at end of file