forked from fischerjulian/facerecognition-yolo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (37 loc) · 1.22 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
FROM ubuntu:21.04
LABEL maintainer="[email protected]"
LABEL description="Facerecognition using (Darnket) Yolo Weights."
RUN mkdir /workdir
WORKDIR /workdir
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Installation
RUN apt-get update && apt-get -y install --no-install-recommends \
pkg-config \
apt-utils \
autoconf \
automake \
libtool \
build-essential \
git \
python3 python3-numpy python3-setuptools python3-pip\
libopencv-dev opencv-data \
ruby-dev \
ruby \
libxml2-dev \
libcurl4-openssl-dev \
vim
RUN gem install bundler
COPY yolo_opencv.py /workdir/yolo_opencv.py
COPY yolov3.cfg /workdir/yolov3.cfg
COPY yolov3.txt /workdir/yolov3.txt
COPY yolov3.weights /workdir/yolov3.weights
RUN pip3 install opencv-python
# Provide an exemplary origina-file for, mainly for manual testing.
# RUN cp /workdir/object-detection-opencv/dog.jpg /tmp/original-image.jpg
COPY Gemfile /workdir/Gemfile
COPY worker.rb /workdir/worker.rb
RUN bundle
# Recommended CMD
# cd object-detection-opencv && python3 yolo_opencv.py --image /tmp/original-image.jpg --config yolov3.cfg --weights ../yolov3.weights --classes yolov3.txt
CMD ["ruby", "worker.rb"]