@@ -14,33 +14,47 @@ jobs:
1414 with :
1515 ref : ${{ github.head_ref || github.ref_name }}
1616
17- - name : Build Dependencies
18- id : depends1
17+ - name : Install Dependencies
18+ id : depends
1919 run : |
2020 sudo apt-get update
2121 sudo apt-get install -y python3-tk python3-pip python3-dev build-essential \
2222 libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev \
2323 crossbuild-essential-arm64 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
2424
25- - name : Python Dependencies
26- id : depends2
27- run : |
28- pip install customtkinter pyinstaller tk
29-
30- - name : Build with ARM NEON Support
25+ - name : Cross compile binary build for ARM64
3126 id : build_binary
3227 run : |
33- # Enable cross-compilation for ARM
3428 export CC=aarch64-linux-gnu-gcc
3529 export CXX=aarch64-linux-gnu-g++
3630 export AR=aarch64-linux-gnu-ar
3731 export UNAME_M=aarch64
3832 export UNAME_S=Linux
39-
4033 make LLAMA_PORTABLE=1
4134 chmod +x './create_ver_file.sh'
4235 . create_ver_file.sh
43- pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-linux-arm64"
36+
37+ - name : Install QEMU
38+ run : |
39+ sudo apt-get update
40+ sudo apt-get install -y qemu-user-static binfmt-support
41+
42+ - name : Setup QEMU for ARM64
43+ run : |
44+ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
45+
46+ - name : Build ARM64 PyInstaller
47+ run : |
48+ docker run --rm \
49+ --platform linux/arm64 \
50+ -v "${PWD}:/src" \
51+ python:3.9-slim-bullseye \
52+ /bin/bash -c "
53+ apt-get update && apt-get install -y build-essential && \
54+ pip install customtkinter pyinstaller tk && \
55+ cd /src && \
56+ pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n 'koboldcpp-linux-arm64'
57+ "
4458
4559 - name : Save artifact
4660 uses : actions/upload-artifact@v3
0 commit comments