[Build] Fix API rate limit exceeded when using VLLM_USE_PRECOMPILED=1 (#36229)
Signed-off-by: elvischenv <219235043+elvischenv@users.noreply.github.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
17
setup.py
17
setup.py
@@ -657,13 +657,18 @@ class precompiled_wheel_utils:
|
||||
def get_base_commit_in_main_branch() -> str:
|
||||
try:
|
||||
# Get the latest commit hash of the upstream main branch.
|
||||
resp_json = subprocess.check_output(
|
||||
[
|
||||
"curl",
|
||||
"-s",
|
||||
"https://api.github.com/repos/vllm-project/vllm/commits/main",
|
||||
curl_cmd = [
|
||||
"curl",
|
||||
"-s",
|
||||
"https://api.github.com/repos/vllm-project/vllm/commits/main",
|
||||
]
|
||||
github_token = os.getenv("GH_TOKEN", os.getenv("GITHUB_TOKEN"))
|
||||
if github_token:
|
||||
curl_cmd += [
|
||||
"-H",
|
||||
f"Authorization: token {github_token}",
|
||||
]
|
||||
).decode("utf-8")
|
||||
resp_json = subprocess.check_output(curl_cmd).decode("utf-8")
|
||||
upstream_main_commit = json.loads(resp_json)["sha"]
|
||||
print(f"Upstream main branch latest commit: {upstream_main_commit}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user