Last active
February 22, 2020 17:57
-
-
Save davclark/7b5ccb3e494631841d934d827ffb2736 to your computer and use it in GitHub Desktop.
A simple Dockerfile for openpose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following image was genarated from the deepo project: | |
# https://github.com/ufoym/deepo | |
# Running from the generator directory: | |
# python generate.py --cuda-ver=9.2 --cudnn-ver=7 Dockerfile \ | |
# caffe jupyter opencv python==3.6 | |
FROM glassbeadlabs/deepo:caffe-py36-cu92-dnn7 | |
# Install openpose | |
# This snippet was adapted from the following fork | |
# https://github.com/christian-lanius/deepo | |
RUN GIT_CLONE="git clone --depth 10" && \ | |
$GIT_CLONE https://github.com/CMU-Perceptual-Computing-Lab/openpose.git /openpose && \ | |
sed -i 's/set(Caffe_known_gpu_archs "20 21(20) 30 35 50 52 60 61")/set(Caffe_known_gpu_archs "30 35 50 52 60 61 70")/g' /openpose/cmake/Cuda.cmake && \ | |
mkdir -p /openpose/build && cd /openpose/build && \ | |
cmake -DBUILD_CAFFE=OFF \ | |
-DCaffe_INCLUDE_DIRS=/usr/local/include \ | |
-DCaffe_LIBS=/usr/local/lib/libcaffe.so \ | |
-DOpenCV_INCLUDE_DIRS=/usr/local/include \ | |
-DOpenCV_LIBS_DIR=/usr/local/lib \ | |
-DDOWNLOAD_HAND_MODEL=OFF \ | |
-DDOWNLOAD_FACE_MODEL=ON \ | |
-DDOWNLOAD_COCO_MODEL=ON .. && \ | |
make -j"$(nproc)" && \ | |
make install && \ | |
# clean up | |
ldconfig && \ | |
rm -rf /tmp/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment