Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Binary support for ebd-all-minilm #130

Merged
merged 8 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions cht-llama-cpp/build-aarch64-apple-darwin.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

export VERSION=1.1.2

test -f venv/bin/activate || python -m venv venv
source venv/bin/activate


pip install -r requirements.txt pyinstaller
LLAMA_CPP_PATH=$(python -c 'import llama_cpp; print(llama_cpp.__path__[0])')
# macOS (dylib) package
NAME=cht-llama-cpp-mistral-${VERSION}-aarch64-apple-darwin
pyinstaller --onefile \
--target-arch arm64 \
Expand Down
30 changes: 30 additions & 0 deletions ebd-all-minilm/build-aarch64-apple-darwin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e
export VERSION=1.0.4

test -f venv/bin/activate || python -m venv venv
source venv/bin/activate

pip install -r requirements.txt pyinstaller
NAME=ebd-all-minilm-${VERSION}-aarch64-apple-darwin
pyinstaller --onefile \
--copy-metadata filelock \
--copy-metadata huggingface-hub \
--copy-metadata numpy \
--copy-metadata packaging \
--copy-metadata pyyaml \
--copy-metadata regex \
--copy-metadata requests \
--copy-metadata safetensors \
--copy-metadata tokenizers \
--copy-metadata tqdm \
--hidden-import=pytorch \
--collect-data torch \
--copy-metadata torch \
--hidden-import=tiktoken_ext.openai_public \
--hidden-import=tiktoken_ext \
--name=$NAME \
main.py
cp dist/$NAME dist/ebd-all-minilm-${VERSION%%.*}-aarch64-apple-darwin

deactivate