- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I try to run inside Docker classification example on Python:
python dldt/inference-engine/ie_bridges/python/sample/classification_sample/classification_sample.py -m inceptionv3-int8-tf-0001.xml -i cat.jpg
and get:
[ INFO ] Creating Inference Engine
[ INFO ] Loading network files:
inceptionv3-int8-tf-0001.xml
inceptionv3-int8-tf-0001.bin
Traceback (most recent call last):
File "classification_sample.py", line 135, in <module>
sys.exit(main() or 0)
File "classification_sample.py", line 68, in main
supported_layers = ie.query_network(net, "CPU")
File "ie_api.pyx", line 101, in openvino.inference_engine.ie_api.IECore.query_network
RuntimeError: Device with "CPU" name is not registered in the InferenceEngine
Although, I run it on Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz.
Dockerfile:
FROM python:3.7
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
git \
build-essential \
cmake \
curl \
wget \
libssl-dev \
ca-certificates \
git \
libboost-regex-dev \
gcc-multilib \
g++-multilib \
libgtk2.0-dev \
pkg-config \
unzip \
automake \
libtool \
autoconf \
libcairo2-dev \
libpango1.0-dev \
libglib2.0-dev \
libgtk2.0-dev \
libswscale-dev \
libavcodec-dev \
libavformat-dev \
libgstreamer1.0-0 \
gstreamer1.0-plugins-base \
libusb-1.0-0-dev \
libopenblas-dev \
libpng-dev
WORKDIR /opt
ARG OPENCV_VERSION="4.2.0"
ENV OPENCV_VERSION $OPENCV_VERSION
RUN pip install numpy
RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
unzip -q opencv.zip && \
curl -Lo opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
unzip -q opencv_contrib.zip && \
rm opencv.zip opencv_contrib.zip && \
cd opencv-${OPENCV_VERSION} && \
mkdir build && cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${OPENCV_VERSION}/modules \
-D WITH_JASPER=OFF \
-D BUILD_DOCS=OFF \
-D BUILD_EXAMPLES=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_PERF_TESTS=OFF \
-D BUILD_opencv_java=NO \
-D BUILD_opencv_python=YES \
-D BUILD_opencv_python2=NO \
-D BUILD_opencv_python3=YES \
-D PYTHON3_EXECUTABLE=$(which python3.7) \
-D PYTHON_INCLUDE_DIR=/usr/local/include/python3.7m \
-D PYTHON_LIBRARY=/usr/local/lib/libpython3.7m.so \
-D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.7/site-packages/numpy/core/include/ \
-D OPENCV_GENERATE_PKGCONFIG=ON .. && \
make -j $(nproc --all) && \
make preinstall && make install && ldconfig && \
cd / && rm -rf opencv*
RUN git clone https://github.com/opencv/dldt.git && \
cd dldt && \
cd inference-engine && \
git submodule init && \
git submodule update --recursive
RUN pip install -r dldt/inference-engine/ie_bridges/python/requirements.txt
RUN cd dldt/inference-engine && \
mkdir build && cd build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_CLDNN=OFF \
-DENABLE_MKL_DNN=OFF \
-DENABLE_PYTHON=ON \
-DPYTHON_EXECUTABLE=`which python3.7` \
-DPYTHON_LIBRARY=/usr/local/lib/libpython3.7m.so \
-DPYTHON_INCLUDE_DIR=/usr/local/include/python3.7m .. && \
make --jobs=$(nproc --all)
RUN export PYTHONPATH="$PYTHONPATH:/opt/dldt/inference-engine/bin/intel64/Release/lib/python_api/python3.7"
What am I doing wrong?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Output of hello_query_device.py: python hello_query_device/hello_query_device.py Available devices:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replacement of -DENABLE_MKL_DNN=OFF on -DENABLE_MKL_DNN=ON helped.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page