Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation in nextcloud:apache fails #688

Closed
KoMa1012 opened this issue Aug 2, 2023 · 3 comments
Closed

Installation in nextcloud:apache fails #688

KoMa1012 opened this issue Aug 2, 2023 · 3 comments

Comments

@KoMa1012
Copy link

KoMa1012 commented Aug 2, 2023

Expected behaviour

docker-php-ext-install pdlib-master doesn't fail with 2 errors

Actual behaviour

In file included from /usr/include/dlib/gui_core/xlib.h:4,
                 from /usr/include/dlib/gui_core.h:14,
                 from /usr/include/dlib/gui_widgets/drawable.h:10,
                 from /usr/include/dlib/gui_widgets/widgets.h:16,
                 from /usr/include/dlib/gui_widgets.h:13,
                 from /usr/src/php/ext/pdlib-master/src/face_detection.cc:7:
/usr/include/dlib/gui_core/gui_core_kernel_2.h:11:2: error: #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code.  Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
   11 | #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code.  Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
      |  ^~~~~
/usr/include/dlib/gui_core/gui_core_kernel_2.h:12:2: error: #error "Also make sure you have libx11-dev installed on your system"
   12 | #error "Also make sure you have libx11-dev installed on your system"
      |  ^~~~~
make: *** [Makefile:216: src/face_detection.lo] Error 1

Already tried

  1. apt install libx11-dev which outputs libx11-dev is already the newest version (2:1.8.4-2+deb12u1).

Steps to reproduce

  1. take commands from Extend nextcloud:apache
  2. run the commands within the container (as root)
  3. at command: docker-php-ext-install pdlib-master get the stated error message

Server configuration

I'm not sure if this tutorial needs an update or if I'm doing something wrong.

Additionally, I'd prefere the option to run all this computing intensive stuff in another container, so if there is a tutorial how to set up a container which can do all the AI stuff this would also be great for me.

@wuuei
Copy link

wuuei commented Aug 4, 2023

I think that is happening because the Nextcloud docker images recently switched to the bookworm (12) release of Debian.
So the official repository now contains a higher version of pdlib than the one in the instructions, which I think will install that version.
The official one has a /usr/include/dlib/config.h, which contains this:

/* #undef DLIB_ISO_CPP_ONLY */
#define DLIB_NO_GUI_SUPPORT
/* #undef DLIB_ENABLE_STACK_TRACE */

The unofficial one has this:

/* #undef DLIB_ISO_CPP_ONLY */
/* #undef DLIB_NO_GUI_SUPPORT */
/* #undef DLIB_ENABLE_STACK_TRACE */

I have no idea if it doesn't screw some other thing up, but commenting that out lets the install complete (and it still detects faces).
So I added this to my Dockerfile before the docker-php-ext-install:

RUN sed -i 's/#define DLIB_NO_GUI_SUPPORT/\/* #undef DLIB_NO_GUI_SUPPORT *\//g' /usr/include/dlib/config.h && docker-php-ext-install pdlib-master

This being a docker container, and no other service needs pdlib, I think it should be fine(?).
Anyway, with that change it works again for me :)

@KoMa1012
Copy link
Author

KoMa1012 commented Aug 7, 2023

I checked this suggestion today and it seems to work, I didn't run excessive testing, but it doesn't fail and I was able to install facerecognition.
Next test will be to run a clasification and see if it will start the classification process.

matiasdelellis added a commit that referenced this issue Aug 22, 2023
To the happiness of many (Issue #690, #688, #687, 685, #649, #632,
extension, but it goes without saying that its use is still highly
recommended.

You will understand that it is slower, however I must admit that with
JIT enabled, it is quite acceptable, and this is the only reason why
decided to publish it.

It is still experimental, and it works, but it has problems such as it
seems not to converge in stable clusters. When I can fix this, it will
probably be even slower.
matiasdelellis added a commit that referenced this issue Aug 22, 2023
To the happiness of many (Issue #690, #688, #687, $685, #649, #632,
extension, but it goes without saying that its use is still highly
recommended.

You will understand that it is slower, however I must admit that with
JIT enabled, it is quite acceptable, and this is the only reason why
decided to publish it.

It is still experimental, and it works, but it has problems such as it
seems not to converge in stable clusters. When I can fix this, it will
probably be even slower.
matiasdelellis added a commit that referenced this issue Aug 22, 2023
To the happiness of many (Issue #690, #688, #687, #685, #649, #632,
extension, but it goes without saying that its use is still highly
recommended.

You will understand that it is slower, however I must admit that with
JIT enabled, it is quite acceptable, and this is the only reason why
decided to publish it.

It is still experimental, and it works, but it has problems such as it
seems not to converge in stable clusters. When I can fix this, it will
probably be even slower.
matiasdelellis added a commit that referenced this issue Aug 22, 2023
To the happiness of many (Issue #690, #688, #687, #685, #649, #632, #627, #625, etc),
this means that we do not depend on the pdlib extension, but it goes
without saying that its use is still highly recommended.

You will understand that it is slower, however I must admit that with
JIT enabled, it is quite acceptable, and this is the only reason why
decided to publish it.

It is still experimental, and it works, but it has problems such as it
seems not to converge in stable clusters. When I can fix this, it will
probably be even slower.
matiasdelellis added a commit that referenced this issue Aug 23, 2023
To the happiness of many (Issues #690, #688, #687, #685, #649, #632
, #627, #625, etc..?) this means that we do not depend on the pdlib
extension, but it goes without saying that its use is still highly
recommended.

You will understand that it is slower, however I must admit that with
JIT enabled, it is quite acceptable, and this is the only reason why
decided to publish it.
@matiasdelellis
Copy link
Owner

Hi,
I invite you to try the external model, using the latest version released.

Open a new issue to see how we continue. 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants