-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
51 lines (42 loc) · 1.23 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
# Use anaconda python image
FROM continuumio/anaconda3
# Set working directory
WORKDIR /app
# Copy the files over to the directory
COPY . /app
# Update apt
RUN apt-get -y update
# Install dlib and its pre recs
# See: https://github.com/ageitgey/face_recognition/blob/master/Dockerfile
RUN apt-get install -y python3-setuptools
RUN apt-get install -y --fix-missing \
build-essential \
python3-dev \
python3-numpy \
cmake \
gfortran \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-dev \
libavcodec-dev \
libavformat-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
software-properties-common \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
RUN cd ~ && \
mkdir -p dlib && \
git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS
# Install packages from requiremenst
RUN pip install -r requirements.txt
# Expose the bokeh port
EXPOSE 5006
# Launch app using default headers (for SSL purposes) and enabling connections from
# anywhere
CMD ["bokeh", "serve", "./face_demo/main.py", "--use-xheaders", "--allow-websocket-origin=*"]