Using PHP-ML in a specific app

I have built my app, and now I need to do something with the app’s database, such as analyze data, predict, and visualize. Based on my requirements and some research on the Internet, I chose to use linear regression. There’s ml.js for the client side and PHP-ML for the server side. On the client side, it would not be a good choice because I need call APIs to fetch needed data. But on the server side, I can’t find a document for installing a library or framework and how to integrate them with my app.
I use Nextcloud 27 and MySQL 8.0.

Well, you will not find much how to ship PHP modules as part of the nextdoor core. Simply put: this is impossible.

You can say, that your app expects a certain extension of PHP to be present. Then, the user/administrator is responsible to install the extension before the app can run. But you cannot ship that with the PHP code.

Skipping with the frontend code and transmitting the data might be doable but depends on the amount. In general at least, you have control over the packages available.

Having said that, there is a new feature of Nextcloud to deploy an app as a container next to the actual core. This might be one option if you want to go the ml route. Then you could even use Python and Tensorflow to go all in (or whatever AI framework you like). However, I have never done something like this and cannot help any further with that way, sorry.



I see. I’ll use some basic statistic instead. :smiling_face:

In the mail app we use to do some basic bayesian classification stuff. It’s a really good library.

And as Chris said, there’s External Apps now that allow you to install special docker-based nextcloud apps, you can check out this link cloud-py-api · GitHub but we’re still in the process of documenting everything.