Fix python demo warning

This commit is contained in:
ClawSeven 2021-07-14 14:18:07 +08:00 committed by Zongmin.Gu
parent 1c625f53b8
commit 3035a0353a
2 changed files with 3 additions and 3 deletions

@ -8,5 +8,5 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# 2. Install python and dependencies to specified position # 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 [ -d 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 [ -d miniconda ] || bash ./Miniconda3-latest-Linux-x86_64.sh -b -p $script_dir/miniconda
$script_dir/miniconda/bin/conda create --prefix $script_dir/occlum_instance/image/opt/python-occlum -y python=3.7 numpy pandas scipy=1.3.1 Cython scikit-learn=0.21.1 $script_dir/miniconda/bin/conda create --prefix $script_dir/occlum_instance/image/opt/python-occlum -y python=3.7 numpy=1.18.1 pandas=0.24.2 scipy=1.3.1 Cython scikit-learn=0.21.1

@ -21,9 +21,9 @@ if [ ! -L "image/bin/python3" ];then
cp -f /opt/occlum/glibc/lib/librt.so.1 image/opt/occlum/glibc/lib/ cp -f /opt/occlum/glibc/lib/librt.so.1 image/opt/occlum/glibc/lib/
cp -rf ../dataset image cp -rf ../dataset image
cp -f ../demo.py image cp -f ../demo.py image
new_json="$(jq '.resource_limits.user_space_size = "320MB" | new_json="$(jq '.resource_limits.user_space_size = "640MB" |
.resource_limits.kernel_space_heap_size = "256MB" | .resource_limits.kernel_space_heap_size = "256MB" |
.process.default_mmap_size = "256MB" | .process.default_mmap_size = "512MB" |
.env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \ .env.default += ["PYTHONHOME=/opt/python-occlum"]' Occlum.json)" && \
echo "${new_json}" > Occlum.json echo "${new_json}" > Occlum.json
occlum build occlum build