forked from Anchormen/pose-logo-slap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.cpu
48 lines (39 loc) · 1.78 KB
/
Dockerfile.cpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ubuntu:18.04
#get deps
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-dev python3-pip git g++ wget make libprotobuf-dev protobuf-compiler libopencv-dev \
libgoogle-glog-dev libboost-all-dev libcaffe-cuda-dev libhdf5-dev libatlas-base-dev
#for python api
RUN pip3 install setuptools wheel numpy opencv-python
#replace cmake as old version has CUDA variable bugs
RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.2/cmake-3.14.2-Linux-x86_64.tar.gz && \
tar xzf cmake-3.14.2-Linux-x86_64.tar.gz -C /opt && \
rm cmake-3.14.2-Linux-x86_64.tar.gz
ENV PATH="/opt/cmake-3.14.2-Linux-x86_64/bin:${PATH}"
#get openpose
ENV OPENPOSE_ROOT=/opt/openpose
WORKDIR $OPENPOSE_ROOT
RUN git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git $OPENPOSE_ROOT
#build it
WORKDIR $OPENPOSE_ROOT/build
#RUN cmake -DBUILD_PYTHON=ON -DGPU_MODE=CPU_ONLY -DUSE_MKL=OFF ..
RUN cmake -DBUILD_PYTHON=ON -DGPU_MODE=CPU_ONLY -DUSE_MKL=OFF -DCMAKE_BUILD_TYPE=Release ..
RUN make -j8
RUN cp $OPENPOSE_ROOT/build/caffe/lib/* /usr/lib/x86_64-linux-gnu
# Some more lib linking
ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu
ENV PYTHONPATH $OPENPOSE_ROOT/build/python:$OPENPOSE_ROOT/build/caffe/python
ENV BOOST_LIBRARYDIR /usr/lib/x86_64-linux-gnu/
ENV BOOST_ROOT /usr/lib/x86_64-linux-gnu/
# This is important because the demo is Qt4 based and otherwise you'll get a weird X server error
# https://stackoverflow.com/a/35040140/543720
# https://stackoverflow.com/a/55989420/543720
ENV QT_GRAPHICSSYSTEM "native"
ENV QT_X11_NO_MITSHM 1
# our own stuff
WORKDIR /opt/anchormen/
RUN git clone -b develop https://github.com/Anchormen/pose-logo-slap.git .
RUN pip3 install -r requirements.txt
########### LET HER RIP ############
ENTRYPOINT ["python3", "game.py"]