-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
55 lines (49 loc) · 1.4 KB
/
Dockerfile
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
49
50
51
52
53
54
55
FROM gavrisco/rpi-opencv:v2.4.13-1
MAINTAINER Alex Gavrisco <[email protected]>
RUN ["cross-build-start"]
# Deps
RUN apt-get update && apt-get install -y \
build-essential \
cmake clang \
curl \
git \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-dev \
libboost-all-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python-protobuf\
software-properties-common \
zip \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV CMAKE_C_COMPILER=clang
ENV CMAKE_CXX_COMPILER=clang++
# Build Torch
RUN git clone https://github.com/torch/distro.git ~/torch --recursive
RUN cd ~/torch && bash install-deps && ./install.sh && \
cd install/bin && \
./luarocks install nn && \
./luarocks install dpnn && \
./luarocks install image && \
./luarocks install optim && \
./luarocks install csvigo && \
./luarocks install torchx && \
./luarocks install tds
# Build dlib
RUN cd ~ && \
mkdir -p dlib-tmp && \
cd dlib-tmp && \
curl -L \
https://github.com/davisking/dlib/archive/v19.0.tar.gz \
-o dlib.tar.bz2 && \
tar xf dlib.tar.bz2 && \
cd dlib-19.0/python_examples && \
mkdir build && \
cd build && \
cmake ../../tools/python && \
cmake --build . --config Release && \
cp dlib.so /usr/local/lib/python2.7/dist-packages && \
rm -rf ~/dlib-tmp
RUN ["cross-build-END"]