Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
665e5e85
"@" did not exist on "fd6f93b2b10654324ae58bfea3bc2d0dbff90427"
Unverified
Commit
665e5e85
authored
Jan 25, 2025
by
Ke Bao
Committed by
GitHub
Jan 25, 2025
Browse files
Add step to update sgl-kernel whl index (#3110)
parent
a22f60a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
.github/workflows/release-whl-kernel.yml
.github/workflows/release-whl-kernel.yml
+19
-0
scripts/update_kernel_whl_index.py
scripts/update_kernel_whl_index.py
+16
-0
No files found.
.github/workflows/release-whl-kernel.yml
View file @
665e5e85
...
@@ -42,6 +42,8 @@ jobs:
...
@@ -42,6 +42,8 @@ jobs:
needs
:
build-wheels
needs
:
build-wheels
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Download artifacts
-
name
:
Download artifacts
uses
:
actions/download-artifact@v4
uses
:
actions/download-artifact@v4
with
:
with
:
...
@@ -57,3 +59,20 @@ jobs:
...
@@ -57,3 +59,20 @@ jobs:
token
:
${{ secrets.WHL_TOKEN }}
token
:
${{ secrets.WHL_TOKEN }}
files
:
|
files
:
|
sgl-kernel/dist/*
sgl-kernel/dist/*
-
name
:
Clone wheel index
run
:
git clone https://oauth2:${WHL_TOKEN}@github.com/sgl-project/whl.git sgl-whl
env
:
WHL_TOKEN
:
${{ secrets.WHL_TOKEN }}
-
name
:
Update wheel index
run
:
python3 scripts/update_kernel_whl_index.py
-
name
:
Push wheel index
run
:
|
cd sgl-whl
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "update whl index"
git push
scripts/update_kernel_whl_index.py
0 → 100644
View file @
665e5e85
# Reference: https://github.com/flashinfer-ai/flashinfer/blob/v0.2.0/scripts/update_whl_index.py
import
hashlib
import
pathlib
import
re
for
path
in
sorted
(
pathlib
.
Path
(
"sgl-kernel/dist"
).
glob
(
"*.whl"
)):
with
open
(
path
,
"rb"
)
as
f
:
sha256
=
hashlib
.
sha256
(
f
.
read
()).
hexdigest
()
ver
=
re
.
findall
(
r
"sgl_kernel-([0-9.]+(?:\.post[0-9]+)?)-"
,
path
.
name
)[
0
]
index_dir
=
pathlib
.
Path
(
f
"sgl-whl/cu118"
)
index_dir
.
mkdir
(
exist_ok
=
True
)
base_url
=
"https://github.com/sgl-project/whl/releases/download"
full_url
=
f
"
{
base_url
}
/v
{
ver
}
/
{
path
.
name
}
#sha256=
{
sha256
}
"
with
(
index_dir
/
"index.html"
).
open
(
"a"
)
as
f
:
f
.
write
(
f
'<a href="
{
full_url
}
">
{
path
.
name
}
</a><br>
\n
'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment