-
Notifications
You must be signed in to change notification settings - Fork 212
/
Dockerfile
28 lines (25 loc) · 1.41 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
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM centos:7
ARG NODE_NAME=model_zoo_intel_object_detection
RUN yum update -y && yum install centos-release-scl -y && yum install -y devtoolset-8-gcc*
RUN curl -s https://download.01.org/opencv/master/openvinotoolkit/thirdparty/linux/opencv/opencv_4.5.1-044_centos7.txz | tar --use-compress-program=xz -xvf -
COPY . /custom_nodes/${NODE_NAME}/
COPY custom_node_interface.h /
WORKDIR /custom_nodes/${NODE_NAME}/
RUN mkdir -p /custom_nodes/lib
RUN /opt/rh/devtoolset-8/root/bin/g++ -c -std=c++17 ${NODE_NAME}.cpp -fpic -I/opencv/include/ -Wall -Wno-unknown-pragmas -Werror -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector
RUN /opt/rh/devtoolset-8/root/bin/g++ -shared -o /custom_nodes/lib/libcustom_node_${NODE_NAME}.so ${NODE_NAME}.o -L/opencv/lib/ -I/opencv/include/ -lopencv_core -lopencv_imgproc -lopencv_imgcodecs