This repository has been 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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit for 2021.4.2 release * Fixes to doc & scripts
- Loading branch information
Showing
75 changed files
with
7,752 additions
and
3,989 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# | ||
# Copyright (c) 2020-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. | ||
# | ||
|
||
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 | ||
|
||
#TPM2 TSS Build | ||
WORKDIR /tpm2-tss-build | ||
|
||
RUN wget https://github.com/tpm2-software/tpm2-tss/releases/download/3.0.3/tpm2-tss-3.0.3.tar.gz && \ | ||
tar -xvzf tpm2-tss-3.0.3.tar.gz && \ | ||
cd tpm2-tss-3.0.3 && \ | ||
./configure --with-udevrulesdir=/etc/udev/rules.d/ --prefix=/usr && \ | ||
make -j8 && \ | ||
make install | ||
|
||
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig | ||
WORKDIR /tpm2-abrmd | ||
RUN wget https://github.com/tpm2-software/tpm2-abrmd/releases/download/2.4.0/tpm2-abrmd-2.4.0.tar.gz && \ | ||
tar -xvzf tpm2-abrmd-2.4.0.tar.gz && \ | ||
pushd tpm2-abrmd-2.4.0 && \ | ||
./configure --with-dbuspolicydir=/etc/dbus-1/system.d --prefix=/usr && \ | ||
make -j8 && \ | ||
make install | ||
|
||
WORKDIR /tpm2-tools-build | ||
RUN wget https://github.com/tpm2-software/tpm2-tools/releases/download/5.0/tpm2-tools-5.0.tar.gz && \ | ||
tar -xzf tpm2-tools-5.0.tar.gz && \ | ||
cd tpm2-tools-5.0 && \ | ||
./configure --prefix=/usr && \ | ||
make -j8 && \ | ||
make install | ||
|
||
# Copy packages | ||
RUN mkdir -vp /ovsa-runtime/usr/bin | ||
RUN cp -rv /usr/bin/tpm2* /ovsa-runtime/usr/bin | ||
RUN cp -rv /usr/bin/tss2* /ovsa-runtime/usr/bin | ||
|
||
RUN mkdir -vp /ovsa-runtime/usr/etc | ||
RUN cp -rv /usr/etc/sysusers.d /ovsa-runtime/usr/etc | ||
RUN cp -rv /usr/etc/tmpfiles.d /ovsa-runtime/usr/etc | ||
RUN cp -rv /usr/etc/tpm2-tss /ovsa-runtime/usr/etc | ||
|
||
RUN mkdir -vp /ovsa-runtime/usr/include | ||
RUN cp -rv /usr/include/tss2 /ovsa-runtime/usr/include | ||
|
||
RUN mkdir -vp /ovsa-runtime/usr/lib | ||
RUN cp -rv /usr/lib/libtss2* /ovsa-runtime/usr/lib | ||
RUN cp -rv /usr/lib/pkgconfig /ovsa-runtime/usr/lib | ||
RUN cp -rv /usr/lib/systemd /ovsa-runtime/usr/lib | ||
|
||
RUN mkdir -vp /ovsa-runtime/usr/sbin | ||
RUN cp -rv /usr/sbin/tpm2-abrmd /ovsa-runtime/usr/sbin | ||
|
||
RUN mkdir -vp /ovsa-runtime/usr/share | ||
RUN cp -rv /usr/share/dbus-1 /ovsa-runtime/usr/share | ||
RUN cp -rv /usr/share/man /ovsa-runtime/usr/share | ||
|
||
#RUN mkdir -vp /ovsa-runtime/tpm2-abrmd | ||
#RUN cp -rv /etc/dbus-1/system.d/tpm2-abrmd.conf /ovsa-runtime/tpm2-abrmd/ | ||
|
||
RUN mkdir -vp /ovsa-runtime/etc/dbus-1/system.d/ | ||
RUN cp -rv /etc/dbus-1/system.d/tpm2-abrmd.conf /ovsa-runtime/etc/dbus-1/system.d | ||
|
||
RUN mkdir -vp /ovsa-runtime/usr/local/bin | ||
COPY Scripts/guest/OVSA_tpm2_init.sh /ovsa-runtime/usr/local/bin | ||
|
||
|
||
WORKDIR / | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# | ||
# Copyright (c) 2020-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 openvino/model_server:latest-nginx-mtls as base_build | ||
|
||
LABEL version="1.0.0" | ||
|
||
ARG DL_DIR=/tmp | ||
ARG build_type=dbg | ||
|
||
USER root | ||
|
||
RUN apt update && apt install -y \ | ||
sudo \ | ||
dbus \ | ||
libglib2.0-0 \ | ||
curl && \ | ||
apt clean | ||
|
||
WORKDIR / | ||
RUN mkdir -vp /ovsa-runtime/lib | ||
|
||
# Copy OVSA Runtime Library | ||
COPY /release_files/ovsa-runtime/lib /ovsa-runtime/lib | ||
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:ovms/lib:/usr/lib/:/ovsa-runtime/lib/:/usr/lib/x86_64-linux-gnu | ||
|
||
# Copy ovms_wrapper | ||
COPY /Example/runtime/ovsa_sgx_ovms_wrapper /ovms_wrapper | ||
|
||
# Copy nginx configurations | ||
RUN cp /model_server.conf.template /etc/nginx/conf.d/model_server.conf | ||
|
||
RUN sed -i 's/worker_processes auto/worker_processes 4/g' /etc/nginx/nginx.conf | ||
#RUN sed -i 's/80/8888/g' /etc/nginx/nginx.conf | ||
|
||
# Create OVSA user | ||
RUN useradd -ms /bin/bash ovsa | ||
RUN chown -R ovsa:ovsa /ovsa-runtime | ||
|
||
USER ovsa | ||
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/:/ovsa-runtime/lib/:/usr/lib/x86_64-linux-gnu | ||
|
||
USER root | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD ["/ovms_wrapper"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.