|
1 | 1 | name: Koboldcpp Linux ARM64
|
2 | 2 |
|
3 |
| -on: |
4 |
| - workflow_dispatch |
5 |
| - |
| 3 | +on: workflow_dispatch |
6 | 4 | env:
|
7 | 5 | BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
8 | 6 |
|
9 | 7 | jobs:
|
10 | 8 | linux-arm:
|
11 | 9 | runs-on: ubuntu-latest
|
12 | 10 | steps:
|
13 |
| - - name: Clone Repository |
| 11 | + - name: Clone |
14 | 12 | id: checkout
|
15 | 13 | uses: actions/checkout@v3
|
16 | 14 | with:
|
17 | 15 | ref: ${{ github.head_ref || github.ref_name }}
|
18 | 16 |
|
19 |
| - - name: Setup Build Environment |
20 |
| - id: setup_environment |
| 17 | + - name: Build Dependencies |
| 18 | + id: depends1 |
21 | 19 | run: |
|
22 |
| - sudo dpkg --add-architecture arm64 |
23 | 20 | sudo apt-get update
|
24 |
| - sudo apt-get install -y \ |
25 |
| - build-essential \ |
26 |
| - crossbuild-essential-arm64 \ |
27 |
| - gcc-aarch64-linux-gnu \ |
28 |
| - g++-aarch64-linux-gnu \ |
29 |
| - python3 \ |
30 |
| - python3-tk \ |
31 |
| - python3-pip \ |
32 |
| - qemu-user-static \ |
33 |
| - binfmt-support \ |
34 |
| - qemu-user-binfmt \ |
35 |
| - libffi-dev:arm64 \ |
36 |
| - zlib1g-dev:arm64 \ |
37 |
| - libssl-dev:arm64 |
38 |
| - sudo update-binfmts --enable qemu-aarch64 |
| 21 | + sudo apt-get install -y python3-tk python3-pip python3-dev build-essential \ |
| 22 | + libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev \ |
| 23 | + crossbuild-essential-arm64 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu |
39 | 24 |
|
40 |
| - - name: Install ARM64 Python Environment |
41 |
| - id: install_arm_python |
| 25 | + - name: Python Dependencies |
| 26 | + id: depends2 |
42 | 27 | run: |
|
43 |
| - # Install ARM64 Python packages using qemu |
44 |
| - python3 -m pip install --upgrade pip |
45 |
| - sudo apt-get install -y python3-arm64 python3-pip-arm64 || true |
46 |
| - python3 -m pip install --no-cache-dir customtkinter pyinstaller tk psutil |
| 28 | + pip install customtkinter pyinstaller tk |
47 | 29 |
|
48 |
| - - name: Build for ARM |
| 30 | + - name: Build with ARM NEON Support |
49 | 31 | id: build_binary
|
50 | 32 | run: |
|
51 | 33 | # Enable cross-compilation for ARM
|
52 |
| - export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu |
53 | 34 | export CC=aarch64-linux-gnu-gcc
|
54 | 35 | export CXX=aarch64-linux-gnu-g++
|
55 | 36 | export AR=aarch64-linux-gnu-ar
|
56 | 37 | export UNAME_M=aarch64
|
57 | 38 | export UNAME_S=Linux
|
58 | 39 |
|
59 |
| - # Build any necessary C/C++ components |
60 | 40 | make LLAMA_PORTABLE=1
|
61 | 41 | chmod +x './create_ver_file.sh'
|
62 |
| - ./create_ver_file.sh |
63 |
| -
|
64 |
| - # Package with ARM64 PyInstaller |
65 |
| - python3-arm64 -m pyinstaller \ |
66 |
| - --noconfirm \ |
67 |
| - --onefile \ |
68 |
| - --collect-all customtkinter \ |
69 |
| - --collect-all psutil \ |
70 |
| - --add-data './koboldcpp_default.so:.' \ |
71 |
| - --add-data './kcpp_adapters:./kcpp_adapters' \ |
72 |
| - --add-data './koboldcpp.py:.' \ |
73 |
| - --add-data './klite.embd:.' \ |
74 |
| - --add-data './kcpp_docs.embd:.' \ |
75 |
| - --add-data './kcpp_sdui.embd:.' \ |
76 |
| - --add-data './taesd.embd:.' \ |
77 |
| - --add-data './taesd_xl.embd:.' \ |
78 |
| - --add-data './rwkv_vocab.embd:.' \ |
79 |
| - --add-data './rwkv_world_vocab.embd:.' \ |
80 |
| - --version-file './version.txt' \ |
81 |
| - --clean \ |
82 |
| - --console \ |
83 |
| - koboldcpp.py \ |
84 |
| - -n "koboldcpp-linux-arm64" |
| 42 | + . 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" |
85 | 44 |
|
86 |
| - - name: Save Artifact |
| 45 | + - name: Save artifact |
87 | 46 | uses: actions/upload-artifact@v3
|
88 | 47 | with:
|
89 | 48 | name: kcpp_linux_arm64_binary
|
90 | 49 | path: dist/
|
| 50 | + |
0 commit comments