This repository was archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile-build-ovsa
60 lines (51 loc) · 1.71 KB
/
Dockerfile-build-ovsa
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
57
58
59
60
#
# Copyright (c) 2020-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=openvino/model_server-build
FROM $BASE_IMAGE as base_build
LABEL version="1.0.0"
SHELL ["/bin/bash", "-c"]
RUN apt update && apt install -y \
libglib2.0-dev \
libjson-c-dev && \
apt clean
# Setting OVMS path to reference the interface header
ENV OVMS_DIR=/ovms/src
ARG use_sgx=0
ARG use_kvm=0
# Copy OVSA src
WORKDIR /ovsa
COPY Ovsa_runtime/ /ovsa/Ovsa_runtime/
COPY Ovsa_tool/ /ovsa/Ovsa_tool
COPY deps/ /ovsa/deps
RUN mkdir -vp /ovsa-runtime/lib
RUN mkdir -vp /ovsa-runtime/usr
RUN mkdir -vp /ovsa-runtime/etc
# Build OVSA Runtime
RUN if [ "$use_sgx" == "1" ]; then \
export GRAMINE_DIR=/ovsa/Ovsa_runtime/src/gramine && \
cd /ovsa/Ovsa_runtime/src/ovms && \
SGX=1 make clean all; \
elif [ "$use_kvm" == "1" ]; then \
cd /ovsa/Ovsa_runtime/src/ovms && \
KVM=1 make clean all; \
else \
cd /ovsa/Ovsa_runtime/src/ovms && \
make clean all; \
fi
RUN cp /ovsa/Ovsa_runtime/src/ovms/libovsaruntime.so /ovsa/Ovsa_runtime/lib/
RUN cp -rv /ovsa/Ovsa_runtime/lib/* /ovsa-runtime/lib/
WORKDIR /
RUN tar cvzf ovsa-runtime.tar.gz /ovsa-runtime