Created
February 7, 2024 20:20
-
-
Save skanga/d12cbb2379d93ef41100ad70b813217d to your computer and use it in GitHub Desktop.
Build java-llama.cpp on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Install JDK & add to path - https://www.oracle.com/java/technologies/downloads/ | |
:: Install Maven & add to path - https://maven.apache.org/download.cgi | |
:: Install Cmake & add to path - https://cmake.org/download/ | |
:: Install w64devkit & add to path - https://github.com/skeeto/w64devkit/releases | |
:: Install Windows SDK - https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/ | |
set W64DEVKIT=c:\bin\w64devkit | |
set JAVA_HOME=c:\java\jdk-11.0.16.1 | |
set PATH=%JAVA_HOME%\bin;%W64DEVKIT%\bin;%PATH% | |
set CMAKE_CXX_COMPILER=%W64DEVKIT%/bin/g++.exe | |
set CMAKE_C_COMPILER=%W64DEVKIT%/bin/gcc.exe | |
:: Test if everything is working | |
java -version | |
cmake -version | |
mvn -v | |
git -v | |
gcc -v | |
g++ -v | |
:: Build project | |
git clone https://github.com/kherud/java-llama.cpp | |
cd java-llama.cpp/ | |
mvn compile | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --config Release | |
:: Check if dll's are created | |
dir ..\src\main\resources\de\kherud\llama\Windows\x86_64\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment