forked from LostRuins/koboldcpp
-
Notifications
You must be signed in to change notification settings - Fork 29
/
make_pyinstaller.sh
executable file
·26 lines (26 loc) · 1.29 KB
/
make_pyinstaller.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
NUMCPUS=`grep -c '^processor' /proc/cpuinfo` # Get max number of CPU threads
NUMCPUS=$(echo "($NUMCPUS*0.75+0.5)/1" | bc) # Set CPU threads to 3/4th avail. threads, rounding to nearest whole number
printf "\033[33;1mMake sure you've installed OpenCL and OpenBLAS by using \"sudo apt install libclblast-dev libopenblas-dev\"\n\n\n\n\n\n\033[0m\n"
sleep 4
# install dependencies
pip install pyinstaller customtkinter && make clean && \
# Ensure all backends are built then build executable file
make LLAMA_HIPBLAS=1 LLAMA_VULKAN=1 LLAMA_OPENBLAS=1 -j$NUMCPUS && \
pyinstaller --noconfirm --onefile --clean --console --collect-all customtkinter --collect-all libclblast-dev --collect-all clinfo --icon ".\niko.ico" \
--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 "./koboldcpp_default.so:." \
--add-data "./koboldcpp_hipblas.so:." \
--add-data "/opt/rocm/lib/libhipblas.so:." \
--add-data "/opt/rocm/lib/librocblas.so:." \
--add-data "./rwkv_vocab.embd:." \
--add-data "./rwkv_world_vocab.embd:." \
--add-data "/opt/rocm/lib/rocblas:." \
--version-file "./version.txt" \
"./koboldcpp.py" -n "koboldcpp_rocm"