Skip to content

Commit

Permalink
build portable zip
Browse files Browse the repository at this point in the history
  • Loading branch information
JinBridger committed Mar 4, 2024
1 parent 805e0ba commit 9967408
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/bigdl-build-portable-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,21 @@ jobs:
with:
name: cpython-3.9-embed-zip
path: ./PCbuild/amd64/en-us/cpython-embed-zip.zip


build-portable-zip:
needs: build-cpython
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cpython-3.9-embed-zip
path: ./python/llm/portable-zip/
- name: Build Portable Zip
shell: cmd
run: |
cd .\python\llm\portable-zip
setup.bat --python-zip
- uses: actions/upload-artifact@v4
with:
name: portable-zip
path: ./python/llm/portable-zip/bigdl-llm.zip
12 changes: 9 additions & 3 deletions python/llm/portable-zip/setup.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
:: download python and extract zip
powershell -Command "Start-BitsTransfer -Source https://www.python.org/ftp/python/3.9.13/python-3.9.13-embed-amd64.zip -Destination python-3.9.13-embed-amd64.zip"
powershell -Command "Expand-Archive .\python-3.9.13-embed-amd64.zip -DestinationPath .\python-embed"
del .\python-3.9.13-embed-amd64.zip
if "%1"=="--python-zip" (
powershell -Command "Expand-Archive .\cpython-3.9-embed-zip.zip -DestinationPath ."
powershell -Command "Expand-Archive .\cpython-embed-zip.zip -DestinationPath .\python-embed"
) else (
powershell -Command "Start-BitsTransfer -Source https://www.python.org/ftp/python/3.9.13/python-3.9.13-embed-amd64.zip -Destination python-3.9.13-embed-amd64.zip"
powershell -Command "Expand-Archive .\python-3.9.13-embed-amd64.zip -DestinationPath .\python-embed"
del .\python-3.9.13-embed-amd64.zip
)


set "python-embed=.\python-embed\python.exe"

Expand Down

0 comments on commit 9967408

Please sign in to comment.