Revering to old installer, add check for #32

This commit is contained in:
boltgolt 2018-11-09 18:53:31 +01:00
parent 2e58a8d10e
commit b1f238d2fb
No known key found for this signature in database
GPG key ID: BECEC9937E1AAE26
3 changed files with 30 additions and 8 deletions

View file

@ -7,16 +7,18 @@ script:
- debuild -i -us -uc -b
# Install the binary, running the debian scripts in the process
- sudo apt install ../*.deb -y
# Confirm the dlib module has been installed correctly
- 'python3 -c "import dlib; print(dlib.__version__); print(\"OK\")"'
- 'python3 -c "import dlib; print(dlib.__version__);'
# Confirm the face_recognition module has been installed correctly
- 'python3 -c "import face_recognition; print(\"OK\")" | ack-grep --passthru "OK"'
- 'python3 -c "import face_recognition; print(face_recognition.__version__);"'
# Check if the username passthough works correctly with sudo
- 'howdy | ack-grep --passthru --color "current active user: travis"'
- 'sudo howdy | ack-grep --passthru --color "current active user: travis"'
# Remove howdy from the installation
- sudo apt purge howdy -y
- streamer --help
notifications:
email:

2
debian/control vendored
View file

@ -9,7 +9,7 @@ Vcs-Git: https://github.com/boltgolt/howdy
Package: howdy
Homepage: https://github.com/boltgolt/howdy
Architecture: all
Depends: ${misc:Depends}, git, python3, python3-pip, python3-dev, python3-setuptools, libpam-python, fswebcam, libopencv-dev, python-opencv, cmake
Depends: ${misc:Depends}, git, python3, python3-pip, python3-dev, python3-setuptools, libpam-python, fswebcam, libopencv-dev, python-opencv, cmake, streamer
Description: Howdy: Windows Hello style authentication for Linux.
Use your built-in IR emitters and camera in combination with face recognition
to prove who you are.

28
debian/postinst vendored
View file

@ -80,16 +80,36 @@ log("Upgrading pip to the latest version")
# Update pip
handleStatus(subprocess.call(["pip3 install --upgrade pip"], shell=True))
log("Cloning dlib")
# Clone the dlib git to /tmp, but only the last commit
handleStatus(subprocess.call(["git", "clone", "--depth", "1", "https://github.com/davisking/dlib.git", "/tmp/dlib_clone"]))
log("Building dlib")
# Start the build without GPU
handleStatus(subprocess.call(["cd /tmp/dlib_clone/; python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA"], shell=True))
log("Cleaning up dlib")
# Remove the no longer needed git clone
handleStatus(subprocess.call(["rm", "-rf", "/tmp/dlib_clone"]))
print("Temporary dlib files removed")
log("Installing python dependencies")
# Install exact dependencies through pip
handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "face_recognition_models==0.3.0", "Click>=6.0", "numpy", "Pillow", "dlib"]))
handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "face_recognition_models==0.3.0", "Click>=6.0", "numpy", "Pillow"]))
log("Installing face_recognition")
# Install face_recognition though pip
handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "face_recognition==1.2.2"]))
handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "opencv-python"]))
handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "--no-deps", "face_recognition==1.2.2"]))
try:
import cv2
except Exception as e:
log("Reinstalling opencv2")
handleStatus(subprocess.call(["pip3", "install", "opencv-python"]))
log("Configuring howdy")