Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] CICD: add github action to release portable exectuable zip #9115

Closed
wants to merge 14 commits into from
41 changes: 41 additions & 0 deletions .github/workflows/bigdl-release-portable-executable-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: BigDL Release Portable Executable Zip

on:
push:
branches: [main]
paths:
- ".github/workflows/bigdl-release-portable-executable-zip.yml"
- "python/llm/portable-executable/**"
pull_request:
branches: [main]
paths:
- ".github/workflows/bigdl-release-portable-executable-zip.yml"
- "python/llm/portable-executable/**"
workflow_dispatch:

jobs:
build-zip-cli:
runs-on: [self-hosted, llm, windows]

steps:
- uses: actions/checkout@v3
- name: run bat
run: '& cd ./python/llm/portable-zip; ./setup.bat'
shell: powershell
- uses: actions/upload-artifact@v3
with:
name: portable-zip
path: ./python/llm/portable-zip/bigdl-llm.zip

build-zip-gui:
runs-on: [self-hosted, llm, windows]

steps:
- uses: actions/checkout@v3
- name: run bat
run: '& cd ./python/llm/portable-zip; ./setup.bat --ui'
shell: powershell
- uses: actions/upload-artifact@v3
with:
name: portable-zip
path: ./python/llm/portable-zip/bigdl-llm-ui.zip
2 changes: 2 additions & 0 deletions python/llm/portable-zip/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import argparse
import sys

sys.path.append(".")

# todo: support more model class
from transformers import AutoModel, AutoModelForCausalLM, AutoTokenizer, AutoConfig
from transformers import TextIteratorStreamer
Expand Down
4 changes: 2 additions & 2 deletions python/llm/portable-zip/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if "%1"=="--ui" (

:: compress the python and scripts
if "%1"=="--ui" (
powershell -Command "Compress-Archive -Path '.\python-embed', '.\chat-ui.bat', '.\README.md' -DestinationPath .\bigdl-llm-ui.zip"
powershell -Command "Compress-Archive -Path '.\python-embed', '.\chat-ui.bat', '.\README-ui.md' -DestinationPath .\bigdl-llm-ui.zip"
) else (
powershell -Command "Compress-Archive -Path '.\python-embed', '.\chat.bat', '.\chat.py', '.\README.md' -DestinationPath .\bigdl-llm.zip"
powershell -Command "Compress-Archive -Path '.\python-embed', '.\chat.bat', '.\chat.py', '.\kv_cache.py' , '.\README.md' -DestinationPath .\bigdl-llm.zip"
)
Loading