Update cluster serving demo with copy_bom

This commit is contained in:
jianfengjiang 2021-09-26 11:01:13 +08:00 committed by Zongmin.Gu
parent cdb4ac560f
commit 7290cfa561
2 changed files with 25 additions and 11 deletions

@ -0,0 +1,23 @@
includes:
- base.yaml
- java-11-openjdk-amd64.yaml
targets:
# copy flink
- target: /bin
copy:
- from: ../flink-${FLINK_VERSION}
- target: /opt
copy:
- dirs:
- ../flink-${FLINK_VERSION}/conf
# copy hosts and localtime
- target: /etc
copy:
- files:
- ../hosts
- /etc/localtime
# copy libnss_files
- target: /opt/occlum/glibc/lib
copy:
- files:
- /opt/occlum/glibc/lib/libnss_files.so.2

@ -21,17 +21,8 @@ init_instance() {
build_flink() { build_flink() {
# Copy JVM and class file into Occlum instance and build # Copy JVM and class file into Occlum instance and build
mkdir -p image/usr/lib/jvm rm -rf image
cp -r /usr/lib/jvm/java-11-openjdk-amd64 image/usr/lib/jvm copy_bom -f ../cluster_serving.yaml --root image --include-dir /opt/occlum/etc/template
cp /lib/x86_64-linux-gnu/libz.so.1 image/lib
cp $occlum_glibc/libdl.so.2 image/$occlum_glibc
cp $occlum_glibc/librt.so.1 image/$occlum_glibc
cp $occlum_glibc/libm.so.6 image/$occlum_glibc
cp $occlum_glibc/libnss_files.so.2 image/$occlum_glibc
cp -rf ../flink-${FLINK_VERSION}/* image/bin/
cp -rf ../flink-${FLINK_VERSION}/conf image/opt/
cp -rf /etc/java-11-openjdk image/etc/
cp -rf ../hosts image/etc/
# build occlum # build occlum
occlum build occlum build
} }