tabby/ci/package-win.sh
Meng Zhang df607a1891
ci: switch shebang to /bin/bash as package-win.sh uses pushd/popd (#2937)
* ci: switch shebang to /bin/bash as package-win.sh uses pushd/popd

* update
2024-08-21 15:08:15 -07:00

23 lines
682 B
Bash
Executable File

#!/bin/bash
# Input variables
LLAMA_CPP_VERSION=${LLAMA_CPP_VERSION:-b3571}
LLAMA_CPP_PLATFORM=${LLAMA_CPP_PLATFORM:-cuda-cu11.7.1-x64}
OUTPUT_NAME=${OUTPUT_NAME:-tabby_x86_64-windows-msvc-cuda117}
NAME=llama-${LLAMA_CPP_VERSION}-bin-win-${LLAMA_CPP_PLATFORM}
ZIP_FILE=${NAME}.zip
curl https://github.com/ggerganov/llama.cpp/releases/download/${LLAMA_CPP_VERSION}/${ZIP_FILE} -L -o ${ZIP_FILE}
unzip ${ZIP_FILE} -d ${OUTPUT_NAME}
pushd ${OUTPUT_NAME}
rm $(ls *.exe | grep -v "llama-server")
cp ../tabby_x86_64-windows-msvc.exe/tabby_x86_64-windows-msvc.exe tabby.exe
popd
zip -r ${OUTPUT_NAME}.zip ${OUTPUT_NAME}
rm -rf ${OUTPUT_NAME}
mkdir -p dist
mv ${OUTPUT_NAME}.zip dist/