diff --git a/ppml/trusted-big-data-ml/scala/docker-occlum/Dockerfile b/ppml/trusted-big-data-ml/scala/docker-occlum/Dockerfile index ceb7bbe7c32..c8b46457490 100644 --- a/ppml/trusted-big-data-ml/scala/docker-occlum/Dockerfile +++ b/ppml/trusted-big-data-ml/scala/docker-occlum/Dockerfile @@ -158,7 +158,7 @@ RUN cd /opt && \ sed -i 's/2.4.0/3.1.2/g' tpch.sbt && \ sbt package -FROM occlum/occlum:0.28.1-ubuntu20.04 as ppml +FROM occlum/occlum:0.29.5-ubuntu20.04 as ppml ARG BIGDL_VERSION=2.1.0 ARG SPARK_VERSION diff --git a/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh b/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh index 7e51d8e8292..f387df358f0 100644 --- a/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh +++ b/ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh @@ -18,6 +18,12 @@ if [ -z "$uidentry" ] ; then fi fi +#check glic ENV MALLOC_ARENA_MAX for k8s +if [[ -z "$MALLOC_ARENA_MAX" ]]; then + echo "No MALLOC_ARENA_MAX specified, set to 1." + export MALLOC_ARENA_MAX=1 +fi + # check occlum log level for k8s export ENABLE_SGX_DEBUG=false export OCCLUM_LOG_LEVEL=off diff --git a/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh b/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh index a9f40cab62f..33b90db79b0 100644 --- a/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh +++ b/ppml/trusted-big-data-ml/scala/docker-occlum/run_spark_on_occlum_glibc.sh @@ -45,8 +45,9 @@ init_instance() { .process.default_heap_size = "SGX_HEAP" | .metadata.debuggable = "ENABLE_SGX_DEBUG" | .resource_limits.kernel_space_heap_size="SGX_KERNEL_HEAP" | + .resource_limits.kernel_space_heap_max_size="SGX_KERNEL_HEAP" | .entry_points = [ "/usr/lib/jvm/java-8-openjdk-amd64/bin" ] | - .env.untrusted = [ "DMLC_TRACKER_URI", "SPARK_DRIVER_URL", "SPARK_TESTING" , "_SPARK_AUTH_SECRET" ] | + .env.untrusted = [ "MALLOC_ARENA_MAX", "DMLC_TRACKER_URI", "SPARK_DRIVER_URL", "SPARK_TESTING" , "_SPARK_AUTH_SECRET" ] | .env.default = [ "LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/lib/server:/usr/lib/jvm/java-8-openjdk-amd64/lib:/usr/lib/jvm/java-8-openjdk-amd64/../lib:/lib","SPARK_CONF_DIR=/opt/spark/conf","SPARK_ENV_LOADED=1","PYTHONHASHSEED=0","SPARK_HOME=/opt/spark","SPARK_SCALA_VERSION=2.12","SPARK_JARS_DIR=/opt/spark/jars","LAUNCH_CLASSPATH=/bin/jars/*",""]' Occlum.json)" && \ echo "${new_json}" > Occlum.json echo "SGX_MEM_SIZE ${SGX_MEM_SIZE}" @@ -100,6 +101,12 @@ init_instance() { fi fi + #check glic ENV MALLOC_ARENA_MAX for docker + if [[ -z "$MALLOC_ARENA_MAX" ]]; then + echo "No MALLOC_ARENA_MAX specified, set to 1." + export MALLOC_ARENA_MAX=1 + fi + # check occlum log level for docker export ENABLE_SGX_DEBUG=false export OCCLUM_LOG_LEVEL=off @@ -355,7 +362,7 @@ run_spark_gbt() { build_spark echo -e "${BLUE}occlum run BigDL Spark GBT${NC}" occlum run /usr/lib/jvm/java-8-openjdk-amd64/bin/java \ - -XX:-UseCompressedOops -XX:MaxMetaspaceSize=$META_SPACE \ + -XX:-UseCompressedOops \ -XX:ActiveProcessorCount=4 \ -Divy.home="/tmp/.ivy" \ -Dos.name="Linux" \