61.13 Nextcloud App Recognize

20230605

The Nextcloud recognize app is a face, entity, object, and music recognition app for tagging photos. The app can be installed from the Apps page or from the command line:

sudo nextcloud.occ app:install recognize

The app fails to install Tensorflow for me (Ubuntu 23.04, Nextcloud 25.0.6snap1, Recognize 3.8.0) with the message:

Failed to install Tensorflow.js: CPU-linux-4.2.0.tar.gz\n* Downloading libtensorflow

https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.9.1.tar.gz\n\n*

Building TensorFlow Node.js bindings\nnode-pre-gyp install failed with
error: 

Error: Command failed node-pre-gyp install --fallback-to-build

/usr/bin/env: 'node': No such file or directory

After a sudo nextcloud.occ memories:index the server started going in and out of maintenance mode. The memories:index command gave all indications that it succeeded (except for a Setting locale failed message). I then tried sudo nextcloud.occ maintenance:repair and that was okay until:

[...]
 - Install dependencies
     - ERROR: Failed to install Tensorflow.js: CPU-linux-4.2.0.tar.gz
  * Downloading libtensorflow
https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.9.1.tar.gz

 * Building TensorFlow Node.js bindings
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
/usr/bin/env: 'node': No such file or directory
[...]

On reviewing the log file:

sudo most /var/snap/nextcloud/current/logs/nextcloud.log

there were ongoing entries every 50 seconds that began after the above commands (it was not prevalent prior):

  {"reqId":"Vwrlrb3tMUAyDlAUJVHV", "level":3,
  "time":"2023-06-04T10:26:23+00:00", "remoteAddr":"", "user":"--",
  "app":"recognize", "method":"", "url":"--", "message":"Failed
  to install Tensorflow.js: CPU-linux-4.2.0.tar.gz\n* Downloading
  libtensorflow\nhttps://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.9.1.tar.gz\n\n*
  Building TensorFlow Node.js bindings\nnode-pre-gyp install failed
  with error: Error: Command failed node-pre-gyp install
  --fallback-to-build\n/usr/bin/env: 'node': No such file or
  directory", "userAgent":"--", "version":"25.0.6.1", "data":{"app":"recognize"}}

This caused the server to be in maintenance mode every time this attempted install was being undertaken. This was resolved by disabling recognize 3.8.0.

sudo nextcloud.occ app:disable recognize

A manual reinstall did not succeed installing Tensorflow however the repeated attempts every 50 seconds did not start up again. Perhaps that needs a sudo nextcloud.occ maintenance:repair to get that going.

$ sudo nextcloud.occ app:remove recognize
$ sudo nextcloud.occ app:install recognize

See https://github.com/nextcloud/recognize/issues/113.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0