我想通过docker为python 3安装 openpose 。为此,我正在使用所有命令制作一个Dockerfile,并在安装过程中出现错误。
我正在尝试使用此代码从头构建Dockerfile。
FROM ubuntu
LABEL maintainer = "Ankit Sharma" <ankit.kumar@mirrorsize.com>
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y tzdata
RUN apt-get install -y python3 python3-pip
RUN apt-get install -y libopencv-dev
RUN apt install -y libprotobuf-dev protobuf-compiler
RUN apt-get install -y libhdf5-dev
RUN apt-get install -y libgoogle-glog-dev
RUN apt-get install -y git
RUN apt-get install -y libboost-all-dev
RUN apt-get install -y wget
WORKDIR src
RUN git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git
WORKDIR /src/openpose/3rdparty
RUN rm -r caffe
RUN rm -r pybind11
RUN git clone https://github.com/BVLC/caffe.git
RUN git clone https://github.com/pybind/pybind11.git
WORKDIR /src/openpose/build
RUN apt-get -y install cmake
RUN cmake .. -DBUILD_CAFFE=ON -DBUILD_python=ON -DGPU_MODE=CPU_ONLY -USE_OPENCV=ON
RUN make
RUN make install
RUN make -j 64
我希望进行全新安装,并且安装BUILD_python: ON
和USE_OPENCV: ON
。
这是完整的输出:
-- Build type : Release
--
-- BUILD_SHARED_LIBS : on
-- BUILD_python : OFF
-- BUILD_matlab : OFF
-- BUILD_docs : OFF
-- CPU_ONLY : ON
-- USE_OPENMP : ON
-- USE_OPENCV : OFF
-- USE_LEVELDB : OFF
-- USE_LMDB : OFF
-- ALLOW_LMDB_NOLOCK : OFF
-- USE_SYSTEMTAP : OFF
-- PERFORMANCE_MONITORING : OFF
-- CO_SIM : OFF
--
-- Dependencies:
-- BLAS : Yes (MKL)
-- MKL2017_SUPPORTED : ON, is a default engine
-- MKLDNN_SUPPORTED : ON, is a default engine
-- Boost : Yes (ver. 1.65)
-- glog : Yes
-- gflags : Yes
-- protobuf : Yes (ver. 3.0.0)
-- CUDA : No
--
-- Install:
-- Install path : /src/openpose/build/caffe
--
-- Configuring done
-- Generating done
Caffe版本中还会出现其他错误-
[ 39%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_eltwise_layer.cpp.o
[ 39%] Building CXX object
src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_inner_product_layer.cpp.o
/src/openpose/3rdparty/caffe/src/caffe/layers/mkldnn_inner_product_layer.cpp: In member function 'void
caffe::MKLDNNInnerProductLayer<Dtype>::InitInnerProductBwd(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&)':
/src/openpose/3rdparty/caffe/src/caffe/layers/mkldnn_inner_product_layer.cpp:357:2: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
else
^~~~
/src/openpose/3rdparty/caffe/src/caffe/layers/mkldnn_inner_product_layer.cpp:361:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
ipBwdData_desc.reset(new inner_product_backward_data::desc(init_bottom_md, init_weights_md, init_top_md));
^~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors