Skip to content

Commit

Permalink
[PPML] Branch2.1 upgrade occlum to 0.29.5 (#7642)
Browse files Browse the repository at this point in the history
* upgrade 0.29.5

* add and set malloc_max

* update others
  • Loading branch information
hzjane authored Feb 23, 2023
1 parent 70ab45c commit 4ee00e7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ppml/trusted-big-data-ml/scala/docker-occlum/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions ppml/trusted-big-data-ml/scala/docker-occlum/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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" \
Expand Down

0 comments on commit 4ee00e7

Please sign in to comment.