forked from opendatahub-io/openvino_model_server
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile.redhat
More file actions
56 lines (48 loc) · 2.21 KB
/
Dockerfile.redhat
File metadata and controls
56 lines (48 loc) · 2.21 KB
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
52
53
54
55
56
#
# Copyright (c) 2022 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.
#
ARG BASE_IMAGE=registry.access.redhat.com/ubi9/ubi:9.7
FROM $BASE_IMAGE as base_build
SHELL ["/bin/bash", "-c"]
RUN yum install -y xz git shadow-utils make gcc gcc-c++
WORKDIR /
COPY ovms.tar.gz /
RUN env
RUN tar -xf ovms.tar.gz
RUN groupadd --gid 5000 ovms && \
useradd --home-dir /home/ovms --create-home --uid 5000 --gid 5000 --shell /bin/bash --skel /dev/null ovms && \
chown -R ovms:ovms /ovms
RUN mkdir /licenses && ln -s /ovms/LICENSE /licenses && ln -s /ovms/thirdparty-licenses /licenses/thirdparty-licenses
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.8-1777460003 as release
SHELL ["/bin/bash", "-c"]
RUN microdnf upgrade -y
RUN microdnf install -y shadow-utils make gcc gcc-c++ wget; \
cp -v /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt ; \
groupadd --gid 5000 ovms && groupadd --gid 44 video1 && \
useradd --home-dir /home/ovms --create-home --uid 5000 --gid 5000 --groups 39,44 --shell /bin/bash --skel /dev/null ovms
RUN rpm -ivh https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/tbb-2018.2-9.el8.x86_64.rpm
COPY --from=base_build /ovms /ovms
COPY --from=base_build /licenses /licenses
COPY demos /ovms/demos
RUN wget https://raw.githubusercontent.com/jarro2783/cxxopts/master/include/cxxopts.hpp --no-check-certificate; mkdir -p /ovms/include; mv cxxopts.hpp /ovms/include
WORKDIR /ovms/demos
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/ovms/lib"
RUN make -f MakefileCapi cpp
RUN make -f MakefileCapi c
RUN make -f MakefileCapi benchmark
RUN chown ovms:ovms /ovms/demos
USER ovms
ENTRYPOINT ["/bin/bash"]