forked from sgl-project/sglang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add openAI compatible API (sgl-project#1810)
Co-authored-by: Chayenne <[email protected]>
- Loading branch information
1 parent
5a75683
commit fff0abd
Showing
7 changed files
with
800 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,17 @@ on: | |
workflow_dispatch: | ||
|
||
jobs: | ||
execute-notebooks: | ||
execute-and-deploy: | ||
runs-on: 1-gpu-runner | ||
if: github.repository == 'sgl-project/sglang' | ||
defaults: | ||
run: | ||
working-directory: docs | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: . | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
|
@@ -25,15 +30,16 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
bash scripts/ci_install_dependency.sh | ||
pip install -r docs/requirements.txt | ||
pip install -r requirements.txt | ||
apt-get update | ||
apt-get install -y pandoc | ||
- name: Setup Jupyter Kernel | ||
run: | | ||
python -m ipykernel install --user --name python3 --display-name "Python 3" | ||
- name: Execute notebooks | ||
run: | | ||
cd docs | ||
for nb in *.ipynb; do | ||
if [ -f "$nb" ]; then | ||
echo "Executing $nb" | ||
|
@@ -43,36 +49,15 @@ jobs: | |
fi | ||
done | ||
build-and-deploy: | ||
needs: execute-notebooks | ||
if: github.repository == 'sgl-project/sglang' | ||
runs-on: 1-gpu-runner | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install dependencies | ||
run: | | ||
bash scripts/ci_install_dependency.sh | ||
pip install -r docs/requirements.txt | ||
apt-get update | ||
apt-get install -y pandoc | ||
- name: Build documentation | ||
run: | | ||
cd docs | ||
make html | ||
- name: Push to sgl-project.github.io | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | ||
run: | | ||
cd docs/_build/html | ||
cd _build/html | ||
git clone https://[email protected]/sgl-project/sgl-project.github.io.git ../sgl-project.github.io | ||
cp -r * ../sgl-project.github.io | ||
cd ../sgl-project.github.io | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.