kambo-1st / llama-cpp-php Goto Github PK
View Code? Open in Web Editor NEWThe package enables the use of the LLama C++ library in PHP, thereby allowing the setup and execution of LLM models in PHP on your local machine.
License: MIT License
The package enables the use of the LLama C++ library in PHP, thereby allowing the setup and execution of LLM models in PHP on your local machine.
License: MIT License
I am trying this library on Docker on mac and happened to see this error on test.
I knew this library is tested on Linux only, but I wonder is it possible to run on Docker image.
% make test
docker compose run php php ./test.php
Fatal error: Uncaught FFI\Exception: Failed loading '/var/www/html/vendor/kambo/llama-cpp-php-linux-lib/src/../libllama.so' in /var/www/html/vendor/kambo/llama-cpp-php/src/Native/LLamaCPPFFI.php:59
Stack trace:
#0 /var/www/html/vendor/kambo/llama-cpp-php/src/Native/LLamaCPPFFI.php(59): FFI::cdef('#define FFI_LIB...', '/var/www/html/v...')
#1 /var/www/html/vendor/kambo/llama-cpp-php/src/Native/LLamaCPPFFI.php(49): Kambo\LLamaCPP\Native\LLamaCPPFFI::createWithLibraryInPath('/var/www/html/v...')
#2 /var/www/html/vendor/kambo/llama-cpp-php/src/Native/LLamaCPPFFI.php(30): Kambo\LLamaCPP\Native\LLamaCPPFFI::create()
#3 /var/www/html/vendor/kambo/llama-cpp-php/src/Context.php(35): Kambo\LLamaCPP\Native\LLamaCPPFFI::getInstance()
#4 /var/www/html/test.php(10): Kambo\LLamaCPP\Context::createWithParameter(Object(Kambo\LLamaCpp\Parameters\ModelParameters))
#5 {main}
thrown in /var/www/html/vendor/kambo/llama-cpp-php/src/Native/LLamaCPPFFI.php on line 59
make: *** [test] Error 255
here is my docker environment code.
https://github.com/yandod/php-machine-learning
run
make install
make download
make test
dev-main
8.2
macOS
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.