Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@moiseevigor
Last active May 28, 2020 12:21
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moiseevigor/11c02c694fc0c22fccd59521793aeaa6 to your computer and use it in GitHub Desktop.
Save moiseevigor/11c02c694fc0c22fccd59521793aeaa6 to your computer and use it in GitHub Desktop.
Dockerfile - OpenPose 1.4.0, OpenCV, CUDA 8, CuDNN 6, Python2.7
# inspired by https://gist.github.com/sberryman/6770363f02336af82cb175a83b79de33
FROM bvlc/caffe:gpu
RUN apt-get update -y && apt-get --assume-yes install \
build-essential unzip \
# General dependencies
libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler \
libboost-all-dev \
# Remaining dependencies, 14.04
libgflags-dev libgoogle-glog-dev liblmdb-dev \
# Python libs
libopencv-dev python-opencv python-pip python-dev \
cmake \
libeigen3-dev libviennacl-dev \
libnccl-dev \
doxygen
RUN cp -ruax /opt/caffe/build/include/caffe/proto/ /opt/caffe/include/caffe
RUN pip install --upgrade numpy protobuf opencv-python
# download openpose
RUN cd /opt && \
wget -O openpose.zip https://github.com/CMU-Perceptual-Computing-Lab/openpose/archive/v1.4.0.zip && \
unzip openpose.zip && \
rm -f openpose.zip && \
mv openpose-1.4.0 openpose-master
# compile openpose
ENV OPENPOSE_ROOT /opt/openpose-master
RUN cd /opt/openpose-master && \
mkdir -p build && cd build && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_CAFFE=OFF \
-DBUILD_EXAMPLES=ON \
-DBUILD_DOCS=ON \
-DBUILD_SHARED_LIBS=ON \
-DDOWNLOAD_BODY_25_MODEL=ON \
-DDOWNLOAD_BODY_COCO_MODEL=ON \
-DDOWNLOAD_BODY_MPI_MODEL=ON \
-DDOWNLOAD_HAND_MODEL=ON \
-DWITH_3D_RENDERER:BOOL=OFF \
-DCaffe_INCLUDE_DIRS="/opt/caffe/include" \
-DCaffe_LIBS="/opt/caffe/build/lib/libcaffe.so" \
-DBUILD_PYTHON=ON ../ && \
make all -j"$(nproc)"
@waseemkhan1989
Copy link

Hi!
I have tried to run your dockerfile on Jetson TX2(Jetpack3.1) assuming that bvlc/caffe:gpu image has already CUDA and Cudnn. But I am getting this following error:

Step 2/7 : RUN apt-get update -y && apt-get --assume-yes install build-essential unzip libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libboost-all-dev libgflags-dev libgoogle-glog-dev liblmdb-dev libopencv-dev python-opencv python-pip python-dev cmake libeigen3-dev libviennacl-dev libnccl-dev doxygen
---> Running in 4b3d2854ceb3
standard_init_linux.go:190: exec user process caused "exec format error"
The command '/bin/sh -c apt-get update -y && apt-get --assume-yes install build-essential unzip libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libboost-all-dev libgflags-dev libgoogle-glog-dev liblmdb-dev libopencv-dev python-opencv python-pip python-dev cmake libeigen3-dev libviennacl-dev libnccl-dev doxygen' returned a non-zero code: 1

Any help in this regard?

@moiseevigor
Copy link
Author

@waseemkhan1989 probably the architecture is a problem, jetson is arm-based and bvlc/caffe:gpu is x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment