-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
47 lines (41 loc) · 1.42 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
# To build: docker build -t detector_tf -f Dockerfile .
# To run: docker run -it detector_tf
FROM tensorflow/tensorflow:1.14.0-py3
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "deb http://old-releases.ubuntu.com/ubuntu/ yakkety universe" | tee -a /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
wget \
git \
pkg-config \
ffmpeg \
pkg-config \
python-dev \
python-opencv \
libopencv-dev \
libav-tools \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
python-numpy \
python-pycurl \
python-opencv
# create a non-root user
ARG USER_ID=1000
RUN useradd -m --no-log-init --system --uid ${USER_ID} appuser -g sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER appuser
WORKDIR /home/appuser
ENV PATH="/home/appuser/.local/bin:${PATH}"
RUN wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py --user && \
rm get-pip.py
# Installing videoflow
RUN git clone https://github.com/videoflow/videoflow.git
RUN pip3 install --user /home/appuser/videoflow --find-links /home/appuser/videoflow
# Installing videoflow_contrib.detector_tf
RUN mkdir -p /home/appuser/videoflow_contrib/detector_tf
COPY . /home/appuser/videoflow_contrib/detector_tf
RUN pip3 install --user /home/appuser/videoflow_contrib/detector_tf --find-links /home/appuser/videoflow_contrib/detector_tf
# Command to run example
CMD ["python3", "/home/appuser/videoflow_contrib/detector_tf/examples/object_detector.py"]