Update tensorflow demos with copy_bom
This commit is contained in:
parent
3f78b09df7
commit
436e427fbf
@ -27,18 +27,8 @@ new_json="$(jq '.resource_limits.user_space_size = "7000MB" |
|
|||||||
echo "${new_json}" > Occlum.json
|
echo "${new_json}" > Occlum.json
|
||||||
|
|
||||||
# 2. Copy files into Occlum Workspace and Build
|
# 2. Copy files into Occlum Workspace and Build
|
||||||
mkdir -p image/model
|
rm -rf image
|
||||||
cp -rf ../resnet50-v15-fp32 image/model/
|
copy_bom -f ../tensorflow_serving.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
cp -rf ../ssl_configure image/bin/
|
|
||||||
cp ../tensorflow_model_server image/bin
|
|
||||||
cp ../hosts image/etc/
|
|
||||||
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/libutil.so.1 image/$occlum_glibc
|
|
||||||
cp $occlum_glibc/libpthread.so.0 image/$occlum_glibc
|
|
||||||
cp $occlum_glibc/libnss_files.so.2 image/$occlum_glibc
|
|
||||||
cp $occlum_glibc/libnss_compat.so.2 image/$occlum_glibc
|
|
||||||
|
|
||||||
#occlum build
|
#occlum build
|
||||||
occlum build
|
occlum build
|
||||||
|
20
demos/tensorflow/tensorflow_serving/tensorflow_serving.yaml
Normal file
20
demos/tensorflow/tensorflow_serving/tensorflow_serving.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
includes:
|
||||||
|
- base.yaml
|
||||||
|
targets:
|
||||||
|
# copy model
|
||||||
|
- target: /model
|
||||||
|
copy:
|
||||||
|
- dirs:
|
||||||
|
- ../resnet50-v15-fp32
|
||||||
|
- target: /bin
|
||||||
|
copy:
|
||||||
|
- from: ..
|
||||||
|
dirs:
|
||||||
|
- ssl_configure
|
||||||
|
files:
|
||||||
|
- tensorflow_model_server
|
||||||
|
# copy hosts
|
||||||
|
- target: /etc
|
||||||
|
copy:
|
||||||
|
- files:
|
||||||
|
- ../hosts
|
@ -17,14 +17,8 @@ fi
|
|||||||
cd occlum_instance
|
cd occlum_instance
|
||||||
# Copy files into Occlum Workspace and build
|
# Copy files into Occlum Workspace and build
|
||||||
if [ ! -L "image/bin/python3" ];then
|
if [ ! -L "image/bin/python3" ];then
|
||||||
mkdir -p image/opt
|
rm -rf image
|
||||||
cp -rf $python_dir image/opt/python-occlum
|
copy_bom -f ../tensorflow_training.yaml --root image --include-dir /opt/occlum/etc/template
|
||||||
ln -s /opt/python-occlum/bin/python3 image/bin/python3
|
|
||||||
cp -f /opt/occlum/glibc/lib/libdl.so.2 image/opt/occlum/glibc/lib/
|
|
||||||
cp -f /opt/occlum/glibc/lib/libutil.so.1 image/opt/occlum/glibc/lib/
|
|
||||||
cp -f /opt/occlum/glibc/lib/librt.so.1 image/opt/occlum/glibc/lib/
|
|
||||||
cp -f ../demo.py image/bin
|
|
||||||
cp -f ../mnist.npz image/bin
|
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "5400MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "5400MB" |
|
||||||
.resource_limits.kernel_space_heap_size = "512MB" |
|
.resource_limits.kernel_space_heap_size = "512MB" |
|
||||||
.process.default_mmap_size = "5000MB" |
|
.process.default_mmap_size = "5000MB" |
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
includes:
|
||||||
|
- base.yaml
|
||||||
|
targets:
|
||||||
|
- target: /bin
|
||||||
|
createlinks:
|
||||||
|
- src: /opt/python-occlum/bin/python3
|
||||||
|
linkname: python3
|
||||||
|
# python packages
|
||||||
|
- target: /opt
|
||||||
|
copy:
|
||||||
|
- dirs:
|
||||||
|
- ../python-occlum
|
||||||
|
# below are python code and data
|
||||||
|
- target: /bin
|
||||||
|
copy:
|
||||||
|
- from: ..
|
||||||
|
files:
|
||||||
|
- demo.py
|
||||||
|
- mnist.npz
|
Loading…
Reference in New Issue
Block a user