-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.openface_gpu_vector
63 lines (52 loc) · 1.76 KB
/
Dockerfile.openface_gpu_vector
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
56
57
58
59
60
61
62
63
#FROM nvidia/cuda:8.0-cudnn5-devel
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
git \
wget \
unzip \
yasm \
pkg-config \
libswscale-dev \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libavformat-dev \
libpq-dev
RUN apt-get install -y libreadline-dev
RUN wget --quiet https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash -e
RUN git clone https://github.com/torch/distro.git ~/torch --recursive
RUN cd ~/torch; bash install-deps;
WORKDIR /root/torch
RUN ./install.sh
WORKDIR /root/torch/install/bin
RUN ./luarocks install nn && \
./luarocks install dpnn && \
./luarocks install image && \
./luarocks install optim && \
./luarocks install csvigo && \
./luarocks install torchx && \
./luarocks install tds
RUN ln -s /root/torch/install/bin/* /usr/local/bin
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh
ENV PATH /opt/conda/bin:$PATH
RUN pip install numpy
RUN conda install -c menpo dlib=19.4
RUN conda config --add channels conda-forge
RUN conda install opencv
RUN pip install git+https://github.com/ageitgey/face_recognition_models
ADD . /prog
WORKDIR /prog/openface_vector
# set cuda to True in lua config file for gpu
RUN sed -i "s/'-cuda', false/'-cuda', true/" openface_server.lua
ENV PYTHONPATH=/prog:$PYTHONPATH
ENTRYPOINT ["/opt/conda/bin/python","run_openface.py"]
CMD ["--use_gpu","True"]