After successful Docker build, dlib not quite working right.
abclution opened this issue · 1 comments
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?
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.