Extends the nextcloud:fpm image with face recognition capabilities and more
2.9K
This image extends the official Nextcloud:fpm image with ImageMagick &
FaceRecognition requirements support. Images can be found on Docker hub
at xisdockerhub/nextcloud-facerecognition. Automatic new builds when base images update.
This docker image only supports tags based on the fpm base image. Only a latest tag fpm and major version tags are
supported. New major version will become available soon after a new major version is available on the official image
used as base.
This container only ensures requirements of the face recognition app have been met.
You still need to do some manual steps yourself which are described below.
You need to install the NextCloud app manually in NextCloud > Apps.
Before proceeding to analyze the images, you must properly install and configure the pretrained models using the occ face:setup command.
Run docker exec -it -u www-data <name-of-your-container> ./occ face:setup [-M|--memory MEMORY] [-m|--model MODEL] with the model of your choice.
Make sure to also tweak the settings after changing the model, found at NextCloud > Settings > Face Recognition.
More information about available models and more details about configuration checkout the official repo's documentation.
In order for the face recognition to start detecting faces in the background the Nextcloud background jobs should be configured to cron.
This setting can be found in the NextCloud interface at NextCloud > Settings > Basic Settings.
Make sure to check if this page reports a green "Last job ran x minutes ago." This should take be the case after 5 minutes.

Additionally, you can install the preview generation plugin. The Preview Generator app allows to pre-generate previews, reducing loading times of folders with images and videos. You need to install the app manually in Nextcloud > Apps.
The Nextcloud image supports additional environment variables on top of the variables of the base image. Find available base image variables here .
PRE_GENERATE_THUMBNAIL_INTERVAL_MINUTES: Background task interval, defined in minutes, for pre generation of
previews .
Preview generator should be installed for generation to run. (
default: 15)FACE_RECOGNITION_CRON_INTERVAL_MINUTES: Background task interval, defined in minutes, for face recognition.(default: 15)FACE_RECOGNITION_CRON_TIMEOUT_SECONDS: Face recognition background task timeout, defined in seconds, after which
recognition task should stop. Must be smaller than background interval. (default: 870)PHP_UPLOAD_LIMIT: Default value increased from 512M to 1024M. Sets max size of post data allowed defined in megabytes. This setting also affects file
upload.PHP_MEMORY_LIMIT: Default value increased from 512M to 2048M. This sets the maximum amount of memory in megabytes that a script is allowed to allocate. This
helps prevent poorly written scripts for eating up all available memory on a server.PHP_FPM_MODE (default: dynamic): Choose how the process manager will control the number of child processes. Possible values: static, ondemand, dynamic. This option is mandatory.PHP_FPM_MAX_CHILDREN (default: 240): The number of child processes to be created when pm is set to static and the maximum number of child processes to be created when pm is set to dynamic. This option is mandatory.PHP_FPM_START_SERVERS (default: 24): The number of child processes created on startup. Used only when pm is set to dynamic.PHP_FPM_MIN_SPARE_SERVERS (default: 12): The desired minimum number of idle server processes. Used only when pm is set to dynamic. Also mandatory in this case.PHP_FPM_MAX_SPARE_SERVERS (default: 32): The desired maximum number of idle server processes. Used only when pm is set to dynamic. Also mandatory in this case.Installation of face recognition prerequisites was done with inspiration by the example Dockerfile on the face recognition project page.
In order to enable crontab cronjobs using environment variables, the cronjobs for preview generation and face
recognition are deployed by overwriting the existing crontab file for www-data upon startup using the environment
variable values by setup_cron.sh. Deployed cronjobs are printed in stdout after deployment.
Supervisord is used to start and enable execution of the cronjobs and start php-fpm to start NextCloud.
Production images (fpm) are build and published from master branch.
Development images are build and published from branch develop and published with tag develop.
Content type
Image
Digest
sha256:0758c4535…
Size
693.8 MB
Last updated
about 1 year ago
docker pull xisdockerhub/nextcloud-facerecognition:fpm