Installing facerecognition in NextCloud (Truenas/24.04)

Hello,
I am trying to install facerecognition app in my NextCloud Instance.
I am able to enable the app and allocate the memory, but I stuck when trying to install the model.
Installing the model requires PDLIB. I tried to install it inside the NextCloud Pod but receive this error:

apt install php8.2-pdlib

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package php8.2-pdlib
E: Couldn’t find any package by glob ‘php8.2-pdlib’

These are the commands I used in the Pod:

su -s /bin/bash www-data -c ‘php occ app:enable facerecognition’

facerecognition already enabled

su -s /bin/bash www-data -c ‘php occ face:setup -M MEMORY 1024M’

No arguments expected for “face:setup” command, got “1024M”.
face:setup [-M|–memory MEMORY] [-m|–model MODEL]

su -s /bin/bash www-data -c ‘php occ face:setup -m 3’

You do not meet the dependencies to install the model 3 (DlibHog)
Summary: The PDlib PHP extension is not loaded
Please read the documentation for this model to continue: Models · matiasdelellis/facerecognition Wiki · GitHub

I checked the instructions to install Pdlib.
I think they applies to regular linux/debian installation not necessarily Truenas Scale.

Any idea? is it possible to install shared libraries in Truenas?

You can install in the container, but, as soon as you reboot or restart the container, it will be gone. You would need the php extension loaded in the container, not in Scale.

In order to do as you wish there, you’d need a custom docker container, extended from the base nextcloud image, and a custom app instead of the Scale app. So, if you have docker skills, not that hard. Otherwise, harder. I suppose you could run it in a VM or a jail also.

The custom docker container would take care of installing it in your new container. They have documented this here:

1 Like

Thanks a lot,
Very clear
Sadly, I have not that expertise in dockers
I will wait for the Scale Electric Eel to migrate the Apps to Dockers hoping for more flexibility.