2025-02-02 14:58:18 -05:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2025-06-03 11:20:17 -07:00
|
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
2025-02-02 14:58:18 -05:00
|
|
|
|
2024-12-21 23:53:44 -08:00
|
|
|
import argparse
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
template = """<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<body>
|
|
|
|
|
<h1>Links for vLLM</h1/>
|
2025-08-21 05:15:34 +08:00
|
|
|
<a href="../{x86_wheel_html_escaped}">{x86_wheel}</a><br/>
|
|
|
|
|
<a href="../{arm_wheel_html_escaped}">{arm_wheel}</a><br/>
|
2024-12-21 23:53:44 -08:00
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
|
parser.add_argument("--wheel", help="The wheel path.", required=True)
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
filename = os.path.basename(args.wheel)
|
|
|
|
|
|
|
|
|
|
with open("index.html", "w") as f:
|
|
|
|
|
print(f"Generated index.html for {args.wheel}")
|
2025-08-21 23:32:55 +08:00
|
|
|
# sync the abi tag with .buildkite/scripts/upload-wheels.sh
|
2025-08-21 05:15:34 +08:00
|
|
|
if "x86_64" in filename:
|
|
|
|
|
x86_wheel = filename
|
2025-08-21 23:32:55 +08:00
|
|
|
arm_wheel = filename.replace("x86_64", "aarch64").replace(
|
|
|
|
|
"manylinux1", "manylinux2014"
|
|
|
|
|
)
|
2025-08-21 05:15:34 +08:00
|
|
|
elif "aarch64" in filename:
|
2025-08-21 23:32:55 +08:00
|
|
|
x86_wheel = filename.replace("aarch64", "x86_64").replace(
|
|
|
|
|
"manylinux2014", "manylinux1"
|
|
|
|
|
)
|
2025-08-21 05:15:34 +08:00
|
|
|
arm_wheel = filename
|
|
|
|
|
else:
|
|
|
|
|
raise ValueError(f"Unsupported wheel: {filename}")
|
2024-12-21 23:53:44 -08:00
|
|
|
# cloudfront requires escaping the '+' character
|
|
|
|
|
f.write(
|
2025-08-21 05:15:34 +08:00
|
|
|
template.format(
|
|
|
|
|
x86_wheel=x86_wheel,
|
|
|
|
|
x86_wheel_html_escaped=x86_wheel.replace("+", "%2B"),
|
|
|
|
|
arm_wheel=arm_wheel,
|
|
|
|
|
arm_wheel_html_escaped=arm_wheel.replace("+", "%2B"),
|
|
|
|
|
)
|
2025-05-13 10:28:31 +01:00
|
|
|
)
|