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

build: provide a seperate python3-dlib dependency package on debian #814

Open
wants to merge 4 commits into
base: beta
Choose a base branch
from

Conversation

eatyourbaby
Copy link

@eatyourbaby eatyourbaby commented Jul 5, 2023

Since PEP 668, system-wide Python packages are exclusively managed by package managers, which breaks dlib install on Debian-based OS (#774,#807). Although it's possible to override this behaviour, it can potentially break system packages. Therefore, this PR changes Debian control files to install a separate python3-dlib dependency package.

Unfortunately, python3-dlib doesn't exist as an official Debian package. However, since the deb file is provided via Ubuntu PPA, it is easy to provide python3-dlib package in the same repo with stdeb.

pypi-download dlib
py2dsc dlib-[version].tar.gz

This will automatically build a Debian source package that can be directly uploaded to Launchpad for building.

I have successfully built the packages with the latest beta. You can find the binary packages here.

@Winson-Huang
Copy link

You mean that gdebi the two packages in your release will fix the issue, right?

@Winson-Huang
Copy link

I tried this way, but the python3-lib package's dependency libstdc++6(>13.1) is not satisfied in Debian 12

@eatyourbaby
Copy link
Author

@Winson-Huang I use Debian trixie, which uses GCC 13. I rebuilt the packages on bookworm and they should work for you. They're the deb12 variant on the same release page.

@Octopus1348
Copy link

Nice! I downloaded the deb12 variant, and it works on Ubuntu 23.10, just needs some extra stuff.
I had to install libinih-dev, it ended with an error, but sudo apt --fix-broken install fixed it.
When I tried to add a face using sudo howdy add, it dropped an error, and requested that I run sudo howdy config and change the device_path value, so I did. I ls'd /dev/v4l/by-path/, and have seen the camera devices, selected the one that end with index0, and so changed the value to /dev/v4l/by-path/pci-0000:00:1a.7-usb-0:2:1.0-video-index0.
Now I could add a face without problems, and the authentication works!

Comment on lines -179 to -185
log("Configuring howdy")

# Manually change the camera id to the one picked
for line in fileinput.input(["/etc/howdy/config.ini"], inplace=1):
line = line.replace("use_cnn = false", "use_cnn = " + str(cuda_used).lower())
print(line, end="")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove these lines?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CNN depends on CUDA, and nvidia-cuda-dev is only a suggested package i guess. Could negatively impact performance by not enabling it automatically like this

Comment on lines -179 to -185
log("Configuring howdy")

# Manually change the camera id to the one picked
for line in fileinput.input(["/etc/howdy/config.ini"], inplace=1):
line = line.replace("use_cnn = false", "use_cnn = " + str(cuda_used).lower())
print(line, end="")

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CNN depends on CUDA, and nvidia-cuda-dev is only a suggested package i guess. Could negatively impact performance by not enabling it automatically like this

@@ -9,9 +9,9 @@ Vcs-Git: https://github.com/boltgolt/howdy
Package: howdy
Homepage: https://github.com/boltgolt/howdy
Architecture: amd64
Depends: ${misc:Depends}, libc6, libgcc-s1, libpam0g, libstdc++6, curl | wget, python3, python3-pip, python3-dev, python3-setuptools, python3-numpy, python-opencv | python3-opencv, libopencv-dev, cmake, libinih-dev
PreDepends: python3:any | python3-minimal:any
Depends: ${misc:Depends}, libc6, libgcc-s1, libpam0g, libstdc++6, curl | wget, python3, python3-pip, python3-dev, python3-setuptools, python3-numpy, python-opencv | python3-opencv, libopencv-dev, cmake, libinih-dev, python3-dlib
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that python3-dlib was not used because it crashed a LOT for a ton of people in the early days. Is it stable now?

@piledriver914
Copy link

The debian12 python3-dlib package is working with his howdy_3.0.0 package for me, but its not really stressing dlib much.

@fenollp
Copy link

fenollp commented Jul 17, 2024

I am experiencing the same issue (cc #774 (comment) ).
However, the binaries provided in the description of this PR don't work for me.

Installation fails on python3-dlib (and I have a version of libjpeg-turbo installed)

# sudo dpkg -i python3-dlib_19.24.2-1_amd64_deb13.deb 
Selecting previously unselected package python3-dlib.
(Reading database ... 295958 files and directories currently installed.)
Preparing to unpack python3-dlib_19.24.2-1_amd64_deb13.deb ...
Unpacking python3-dlib (19.24.2-1) ...
dpkg: dependency problems prevent configuration of python3-dlib:
 python3-dlib depends on python3 (<< 3.12); however:
  Version of python3 on system is 3.12.3-0ubuntu1.
 python3-dlib depends on libjpeg62-turbo (>= 1.3.1); however:
  Package libjpeg62-turbo is not installed.

dpkg: error processing package python3-dlib (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3-dlib

@piledriver914
Copy link

piledriver914 commented Jul 17, 2024 via email

@piledriver914
Copy link

piledriver914 commented Jul 17, 2024 via email

@CraigFoote
Copy link

I'm getting the same on Ubuntu 24.04. Do we need a new build? The ones available are a year old.

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

Successfully merging this pull request may close these issues.

8 participants