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

After successful Docker build, dlib not quite working right. #12

Open
abclution opened this issue Mar 25, 2021 · 1 comment
Open

After successful Docker build, dlib not quite working right. #12

abclution opened this issue Mar 25, 2021 · 1 comment

Comments

@abclution
Copy link

First off compiling dlib (which was a pain the the arse and managed to OOM my system 5 times before I got it to build.) Anyways after a successful build, after running the docker command to enter the container, running catfd.py can't find dlib.

./catfd.py
Traceback (most recent call last):
File "./catfd.py", line 9, in
from lib.Detector import Detector
File "/app/lib/Detector.py", line 1, in
import dlib
ModuleNotFoundError: No module named 'dlib'

Log from the build

98%] Building CXX object CMakeFiles/_dlib_pybind11.dir/src/image_dataset_metadata.cpp.o
[ 99%] Building CXX object CMakeFiles/_dlib_pybind11.dir/src/numpy_returns.cpp.o
[100%] Building CXX object CMakeFiles/_dlib_pybind11.dir/src/line.cpp.o
[100%] Linking CXX shared module /root/dlib/build/lib.linux-x86_64-3.8/_dlib_pybind11.cpython-38-x86_64-linux-gnu.so
[100%] Built target _dlib_pybind11
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/dlib
copying build/lib.linux-x86_64-3.8/dlib/init.py -> build/bdist.linux-x86_64/egg/dlib
copying build/lib.linux-x86_64-3.8/_dlib_pybind11.cpython-38-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/dlib/init.py to init.cpython-38.pyc
creating stub loader for _dlib_pybind11.cpython-38-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/_dlib_pybind11.py to _dlib_pybind11.cpython-38.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying tools/python/dlib.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tools/python/dlib.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tools/python/dlib.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tools/python/dlib.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tools/python/dlib.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating dist
creating 'dist/dlib-19.21.99-py3.8-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing dlib-19.21.99-py3.8-linux-x86_64.egg
creating /usr/local/lib/python3.8/dist-packages/dlib-19.21.99-py3.8-linux-x86_64.egg
Extracting dlib-19.21.99-py3.8-linux-x86_64.egg to /usr/local/lib/python3.8/dist-packages
Adding dlib 19.21.99 to easy-install.pth file
Installed /usr/local/lib/python3.8/dist-packages/dlib-19.21.99-py3.8-linux-x86_64.egg

When I check the container, the dlib package has not made it into the container.
(/usr/local/lib/python3.8/dist-packages/dlib-19.21.99-py3.8-linux-x86_64.egg)

I don't quite yet know how to make my own docker containers, and wondering if there is something I am missing here?

@abclution
Copy link
Author

I manage to work around it by entering the container and then rebuilding/running setup on the dlib git pull, but I dont think I am supposed to do this.

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

1 participant