-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (27 loc) · 1.01 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
# syntax=docker/dockerfile:1
FROM borda/docker_python-opencv-ffmpeg:cpu-py3.6-cv4.5.3
COPY . /src
WORKDIR /src
# env setup
ENV DATA_URL="https://app.roboflow.com/ds/08KgRqa2AE?key=xpHsDDSSN9"
ENV WORKSPACE=/src
ENV DARKNET_DIR=/src/darknet
ENV LIB_DARKNET=${DARKNET_DIR}/libdarknet.so
ENV PYTHONPATH=${PYTHONPATH}:${DARKNET_DIR}
ENV YOLO_WEIGHTS=${WORKSPACE}/files/yolo_weights.weights
ENV YOLO_DATA=${DARKNET_DIR}/data/obj.data
ENV YOLO_CONFIG=${WORKSPACE}/files/yolo_config.cfg
# install python dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
libomp-dev git \
make g++ pkg-config libopencv-dev
RUN pip3 install --upgrade pip && pip3 install -r requirements.txt
# build darknet
RUN git clone https://github.com/AlexeyAB/darknet.git
RUN sed -i 's/OPENCV=0/OPENCV=1/g' darknet/Makefile
RUN sed -i 's/LIBSO=0/LIBSO=1/g' darknet/Makefile
RUN sed -i 's/OPENMP=0/OPENMP=1/g' darknet/Makefile
RUN cd darknet && make
RUN bash gather_data.bash
# ENTRYPOINT [ "python3", "/src/sever.py" ]