occlum/demos/linux-ltp/prepare_ltp.sh
Zheng, Qi 4354148ecf Add linux ltp demo
Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
2021-10-22 17:16:52 +08:00

21 lines
637 B
Bash
Executable File

#! /bin/bash
set -e
rm -rf ltp_instance
occlum new ltp_instance
cd ltp_instance
rm -rf image
copy_bom -f ../ltp.yaml --root image --include-dir /opt/occlum/etc/template
new_json="$(jq '.resource_limits.user_space_size = "3000MB" |
.resource_limits.kernel_space_heap_size ="512MB" |
.resource_limits.kernel_space_stack_size ="4MB" |
.resource_limits.max_num_of_threads = 96 |
.entry_points = [ "/opt/ltp" ] |
.env.default = [ "OCCLUM=yes", "LTPROOT=/opt/ltp", "TMP=/tmp", "HOME=/root" ]' Occlum.json)" && \
echo "${new_json}" > Occlum.json
occlum build