I have a Docker machine that I'm installing OpenCV 2.4.11
However, there is an error happening that I indeed found a solution, but it's temporary.
When I run my Python script that uses cv2
, throws this error message:
Error: libdc1394 error: Failed to initialize libdc1394
I saw that this is the only thread that fixed my problem, but temporarily: ctypes error: libdc1394 error: Failed to initialize libdc1394
I added the following line to my Dockerfile
, but that didn't affected my VM.
RUN ln /dev/null /dev/raw1394
However, if I enter that command while the VM is running (docker run -it ...
), it indeed makes things work! However, that doesn't solves my problem, because I need it to be ok on startup, and if I re-enter the VM, the problem comes back.
My Dockerfile:
# Pull base image.
FROM library/ubuntu
MAINTAINER Ivan Seidel <ivanseidel@gmail.com>
RUN apt-get update
#
# Python
#
RUN apt-get install -y python python-dev python-pip python-virtualenv
#
# Node.js and NPM
#
RUN apt-get install -y nodejs nodejs-legacy npm git --no-install-recommends
#
# Install OpenCV
#
RUN apt-get install -y python-opencv --no-install-recommends
RUN ln /dev/null /dev/raw1394
#
# Clear cache
#
RUN rm -rf /var/lib/apt/lists/*
#
# Specific data
#
EXPOSE 80
COPY . /data
WORKDIR /data
RUN npm install --production
CMD ["bash"]