diff --git a/demos/python/python_glibc/install_python_with_conda.sh b/demos/python/python_glibc/install_python_with_conda.sh index 9a5e8c75b..776049996 100755 --- a/demos/python/python_glibc/install_python_with_conda.sh +++ b/demos/python/python_glibc/install_python_with_conda.sh @@ -6,7 +6,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" [ -d occlum_instance ] || occlum new occlum_instance # 2. Install python and dependencies to specified position -[ -d Miniconda3-latest-Linux-x86_64.sh ] || wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh +[ -f Miniconda3-latest-Linux-x86_64.sh ] || wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh [ -d miniconda ] || bash ./Miniconda3-latest-Linux-x86_64.sh -b -p $script_dir/miniconda $script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.7 numpy=1.18.1 pandas=0.24.2 scipy=1.3.1 Cython scikit-learn=0.21.1 diff --git a/demos/python/python_glibc/run_python_on_occlum.sh b/demos/python/python_glibc/run_python_on_occlum.sh index a59b02e6f..120292e01 100755 --- a/demos/python/python_glibc/run_python_on_occlum.sh +++ b/demos/python/python_glibc/run_python_on_occlum.sh @@ -16,8 +16,7 @@ if [ ! -d $python_dir ];then fi new_json="$(jq '.resource_limits.user_space_size = "640MB" | - .resource_limits.kernel_space_heap_size = "256MB" | - .process.default_mmap_size = "512MB" | + .resource_limits.kernel_space_heap_size = "300MB" | .env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \ echo "${new_json}" > Occlum.json occlum build diff --git a/src/sgxenv.mk b/src/sgxenv.mk index 5988d20be..e76d219a5 100644 --- a/src/sgxenv.mk +++ b/src/sgxenv.mk @@ -133,7 +133,7 @@ SGX_CXXFLAGS_T := $(SGX_CFLAGS_T) -std=c++11 -nostdinc++ -I$(SGX_SDK)/include/li # linked. SGX_LFLAGS_T = $(SGX_COMMON_CFLAGS) -nostdlib -L$(SGX_LIBRARY_PATH) $(_Other_Link_Flags) \ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive -ifeq ($(TCMALLOC), Y) +ifneq ($(TCMALLOC), N) SGX_LFLAGS_T += -Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive endif SGX_LFLAGS_T += -Wl,--start-group -lsgx_tcxx -lsgx_tstdc -l$(Crypto_Library_Name) -l$(Service_Library_Name) $(_Other_Enclave_Libs) -Wl,--end-group \