Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Default GStreamer docker image does not build #25

Closed
whbruce opened this issue Aug 24, 2020 · 2 comments · Fixed by #30
Closed

Default GStreamer docker image does not build #25

whbruce opened this issue Aug 24, 2020 · 2 comments · Fixed by #30

Comments

@whbruce
Copy link

whbruce commented Aug 24, 2020

The DL Streamer docker image no longer builds due to versioning issues in the OpenCV python libraries. You will see an error like this

$ docker/build.sh
<snip>
Collecting opencv-python
  Downloading https://files.pythonhosted.org/packages/77/f5/49f034f8d109efcf9b7e98fbc051878b83b2f02a1c73f92bbd37f317288e/opencv-python-4.4.0.42.tar.gz (88.9MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-n761d8ed/opencv-python/setup.py", line 9, in <module>
        import skbuild
    ModuleNotFoundError: No module named 'skbuild'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-n761d8ed/opencv-python/
The command '/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends     libusb-1.0-0-dev libboost-all-dev libgtk2.0-dev python-yaml         clinfo libboost-all-dev libjson-c-dev     build-essential cmake ocl-icd-opencl-dev wget gcovr vim git gdb ca-certificates libssl-dev uuid-dev     libgirepository1.0-dev     python3-dev python3-wheel python3-pip python3-setuptools python-gi-dev python-yaml         libglib2.0-dev libgmp-dev libgsl-dev gobject-introspection libcap-dev libcap2-bin gettext         libx11-dev iso-codes libegl1-mesa-dev libgles2-mesa-dev libgl-dev gudev-1.0 libtheora-dev libcdparanoia-dev libpango1.0-dev libgbm-dev libasound2-dev libjpeg-dev     libvisual-0.4-dev libxv-dev libopus-dev libgraphene-1.0-dev libvorbis-dev         libbz2-dev libv4l-dev libaa1-dev libflac-dev libgdk-pixbuf2.0-dev libmp3lame-dev libcaca-dev libdv4-dev libmpg123-dev libraw1394-dev libavc1394-dev libiec61883-dev     libpulse-dev libsoup2.4-dev libspeex-dev libtag-extras-dev libtwolame-dev libwavpack-dev         libbluetooth-dev libusb-1.0.0-dev libass-dev libbs2b-dev libchromaprint-dev liblcms2-dev libssh2-1-dev libdc1394-22-dev libdirectfb-dev libssh-dev libdca-dev     libfaac-dev libfdk-aac-dev flite1-dev libfluidsynth-dev libgme-dev libgsm1-dev nettle-dev libkate-dev liblrdf0-dev libde265-dev libmjpegtools-dev libmms-dev     libmodplug-dev libmpcdec-dev libneon27-dev libopenal-dev libopenexr-dev libopenjp2-7-dev libopenmpt-dev libopenni2-dev libdvdnav-dev librtmp-dev librsvg2-dev     libsbc-dev libsndfile1-dev libsoundtouch-dev libspandsp-dev libsrtp2-dev libzvbi-dev libvo-aacenc-dev libvo-amrwbenc-dev libwebrtc-audio-processing-dev libwebp-dev     libwildmidi-dev libzbar-dev libnice-dev libxkbcommon-dev         libmpeg2-4-dev libopencore-amrnb-dev libopencore-amrwb-dev liba52-0.7.4-dev         libva-dev libxrandr-dev libudev-dev         && rm -rf /var/lib/apt/lists/*     && python3.6 -m pip install numpy opencv-python pytest' returned a non-zero code: 1

To work around this, you need to patch DL Streamer source and then re-build as follows. Replace /path/to with a directory of your choice.

$ git clone -b preview/audio-detect https://github.com/opencv/gst-video-analytics.git /path/to/gst-video-analytics
$ cd /path/to/gst-video-analytics
$ wget -q -O - https://patch-diff.githubusercontent.com/raw/opencv/gst-video-analytics/pull/100.patch | git apply -
$ cd /path/to/video-analytics-serving
$ docker/build.sh --base-build-context /path/to/gst-video-analytics --base-build-dockerfile /path/to/gst-video-analytics/docker/Dockerfile
@saychuan
Copy link

Suggest not to use "/path/to/gst-video-analytics", this will git clone to root, which create permission denied for some user.

sc@sc-nuc7i7bnhsc-nuc:/path/to/gst-video-analytics$ wget -q -O - https://patch-diff.githubusercontent.com/raw/opencv/gst-video-analytics/pull/100.patch | git apply -
warning: unable to unlink 'docker/binaries.Dockerfile': Permission denied
warning: unable to unlink 'docker/Dockerfile': Permission denied
error: unable to write file 'docker/binaries.Dockerfile' mode 100644: Permission denied

Suggest to git clone to any home directory.

@whbruce
Copy link
Author

whbruce commented Aug 28, 2020

/path/to is a common convention to indicate a path of your choice. I have updated the workaround to make that clear.

@whbruce whbruce linked a pull request Sep 1, 2020 that will close this issue
@nnshah1 nnshah1 unpinned this issue Sep 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants