Fix index

Signed-off-by: mgoin <michael@neuralmagic.com>
This commit is contained in:
mgoin 2025-07-30 11:56:36 -04:00
parent f626cc9300
commit 67ba6a9487

View File

@ -26,20 +26,33 @@ fi
# Extract the version from the wheel # Extract the version from the wheel
version=$(unzip -p "$wheel" '**/METADATA' | grep '^Version: ' | cut -d' ' -f2) version=$(unzip -p "$wheel" '**/METADATA' | grep '^Version: ' | cut -d' ' -f2)
wheel_name=$(basename "$wheel")
echo "FlashInfer version: $version" echo "FlashInfer version: $version"
# Upload the wheel to S3 under flashinfer directory # Upload the wheel to S3 under flashinfer directory
aws s3 cp "$wheel" "s3://vllm-wheels/flashinfer/" aws s3 cp "$wheel" "s3://vllm-wheels/flashinfer/"
# Generate simple index.html for the package (following pip index pattern) # Download existing index if it exists, then rebuild it with all wheels
wheel_name=$(basename "$wheel") echo "Rebuilding index with all available wheels..."
cat > flashinfer_index.html << EOF 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'
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head><title>Links for flashinfer-python</title></head> <head><title>Links for flashinfer-python</title></head>
<body> <body>
<h1>Links for flashinfer-python</h1> <h1>Links for flashinfer-python</h1>
<a href="$wheel_name">$wheel_name</a><br/> EOF
# Add each wheel to the index
while IFS= read -r wheel_file; do
if [[ -n "$wheel_file" ]]; then
echo "<a href=\"$wheel_file\">$wheel_file</a><br/>" >> flashinfer_index.html
fi
done < wheel_list.txt
cat >> flashinfer_index.html << 'EOF'
</body> </body>
</html> </html>
EOF EOF
@ -47,6 +60,6 @@ EOF
aws s3 cp flashinfer_index.html "s3://vllm-wheels/flashinfer/index.html" aws s3 cp flashinfer_index.html "s3://vllm-wheels/flashinfer/index.html"
# Clean up # Clean up
rm -f flashinfer_index.html rm -f flashinfer_index.html wheel_list.txt
echo "Successfully uploaded FlashInfer wheel $wheel_name (version $version)" echo "Successfully uploaded FlashInfer wheel $wheel_name (version $version)"