Docker build fails on docker hub
I`m creating a dockerfile which contains both .NET Core, OpenCV and OpenCVSharp. You can find the full Dockerfile here: https://github.com/Josvds/dotnetopenc...
During the build I get the following error, no matter what I change. I have tried this with using git clone and checking out the exact version also tried it with downloading zip and extracting.
[ 77%] Built target opencv_datasets
[ 77%] Generating qrc_window_QT.cpp
[91mRCC: Error in '/build/opencv/modules/highgui/src/window_QT.qrc': Cannot find file 'files_Qt/Milky/48/28.png'
[0m
[91mmake[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:78: modules/highgui/qrc_window_QT.cpp] Error 1
[0m
[91mmake[1]: *** [CMakeFiles/Makefile2:4375: modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
[0m
[91mmake: *** [Makefile:163: all] Error 2
[0m
Removing intermediate container ee966db89e4a
The command '/bin/sh -c make -j$(nproc)' returned a non-zero code: 2
When building this on my desktop (windows) or my personal server (debian) the build works perfectly.
RUN cmake \
# Compiler params
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/build/dist \
-D OPENCV_GENERATE_PKGCONFIG=YES \
# Modules
-D OPENCV_EXTRA_MODULES_PATH=/build/opencv_contrib/modules \
# No examples
-D INSTALL_PYTHON_EXAMPLES=NO \
-D INSTALL_C_EXAMPLES=NO \
# Support
-D WITH_IPP=NO \
-D WITH_1394=NO \
-D WITH_LIBV4L=NO \
-D WITH_V4l=YES \
-D WITH_TBB=YES \
-D WITH_FFMPEG=YES \
-D WITH_GPHOTO2=YES \
-D WITH_GSTREAMER=YES \
-D WITH_QT=YES \
-D WITH_OPENGL=YES \
# NO doc test and other bindings
-D BUILD_DOCS=NO \
-D BUILD_TESTS=NO \
-D BUILD_PERF_TESTS=NO \
-D BUILD_EXAMPLES=NO \
-D BUILD_opencv_java=NO \
-D BUILD_opencv_python2=NO \
-D BUILD_ANDROID_EXAMPLES=NO ..
RUN make -j$(nproc)
RUN make install
What I want to achieve with this is having one container (which I don't have to build over and over again) for several applications I`m creating. Within this I would like to be able to read MP4 files and RTSP streams (via TCP and UDP) from .NET Core with OpenCVSharp.
Someone with any idea what I`m doing wrong?
will this even run on a machine with a desktop / monitor ?
somehow your qt install looks broken, but i bet you do not need any gui at all here and could just
Thanks for the quick response. I tried this out now I get this.
that's a small bug (dnn_objdetect should not depend on highgui at all)
for now, you can disable it:
if you want to keep the module, it seems safe to remove the include, it's not needed at all
After changing this setting, i still got the same error.. I`m also not exactly sure which of these I need for MP4 and RTSP.
ffmpeg or gstreamer
Thanks this worked for me, by reducing these items I was able to get it working on docker hub. Thanks a lot.