Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Dec 6, 2024
1 parent 25b5301 commit b411192
Showing 1 changed file with 15 additions and 55 deletions.
70 changes: 15 additions & 55 deletions .github/workflows/kcpp-build-release-arm64.yaml
Original file line number Diff line number Diff line change
@@ -1,90 +1,50 @@
name: Koboldcpp Linux ARM64

on:
workflow_dispatch

on: workflow_dispatch
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
linux-arm:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
- name: Clone
id: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref || github.ref_name }}

- name: Setup Build Environment
id: setup_environment
- name: Build Dependencies
id: depends1
run: |
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install -y \
build-essential \
crossbuild-essential-arm64 \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
python3 \
python3-tk \
python3-pip \
qemu-user-static \
binfmt-support \
qemu-user-binfmt \
libffi-dev:arm64 \
zlib1g-dev:arm64 \
libssl-dev:arm64
sudo update-binfmts --enable qemu-aarch64
sudo apt-get install -y python3-tk python3-pip python3-dev build-essential \
libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev \
crossbuild-essential-arm64 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Install ARM64 Python Environment
id: install_arm_python
- name: Python Dependencies
id: depends2
run: |
# Install ARM64 Python packages using qemu
python3 -m pip install --upgrade pip
sudo apt-get install -y python3-arm64 python3-pip-arm64 || true
python3 -m pip install --no-cache-dir customtkinter pyinstaller tk psutil
pip install customtkinter pyinstaller tk
- name: Build for ARM
- name: Build with ARM NEON Support
id: build_binary
run: |
# Enable cross-compilation for ARM
export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export AR=aarch64-linux-gnu-ar
export UNAME_M=aarch64
export UNAME_S=Linux
# Build any necessary C/C++ components
make LLAMA_PORTABLE=1
chmod +x './create_ver_file.sh'
./create_ver_file.sh
# Package with ARM64 PyInstaller
python3-arm64 -m 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"
. create_ver_file.sh
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"
- name: Save Artifact
- name: Save artifact
uses: actions/upload-artifact@v3
with:
name: kcpp_linux_arm64_binary
path: dist/

0 comments on commit b411192

Please sign in to comment.