occlum/demos/redis/run_occlum_redis_glibc.sh
Zheng, Qi 09b79083b2 Update redis demo with copy_bom tool
Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
2021-09-26 15:36:09 +08:00

22 lines
578 B
Bash
Executable File

#!/bin/bash
set -e
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
bomfile=${SCRIPT_DIR}/redis_glibc.yaml
# 1. Init Occlum Workspace
rm -rf occlum_instance
occlum new occlum_instance
cd occlum_instance
new_json="$(jq '.resource_limits.user_space_size = "320MB" |
.process.default_mmap_size = "256MB"' Occlum.json)" && \
echo "${new_json}" > Occlum.json
rm -rf image
copy_bom -f $bomfile --root image --include-dir /opt/occlum/etc/template
#occlum build
occlum build
# 3. Run redis server
occlum run /bin/redis-server --save "" --appendonly no &