Fix python3.7 PIE issue

This commit is contained in:
Zheng, Qi 2022-10-20 18:51:03 +08:00 committed by volcano
parent c60a19177b
commit 85fa88fc00
4 changed files with 6 additions and 7 deletions

@ -6,7 +6,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
[ -d occlum_instance ] || occlum new occlum_instance [ -d occlum_instance ] || occlum new occlum_instance
# 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 [ -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 [ -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 $script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.8 numpy=1.21.5 scipy=1.7.3 scikit-learn=1.0 pandas=1.3 Cython

@ -18,8 +18,7 @@ if [ ! -d $python_dir ];then
fi fi
new_json="$(jq '.resource_limits.user_space_size = "640MB" | new_json="$(jq '.resource_limits.user_space_size = "640MB" |
.resource_limits.kernel_space_heap_size = "256MB" | .resource_limits.kernel_space_heap_size = "300MB" |
.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

@ -6,6 +6,6 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
[ -d occlum_instance ] || occlum new occlum_instance [ -d occlum_instance ] || occlum new occlum_instance
# 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 [ -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 [ -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 pytorch numpy torchvision -c pytorch $script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.8 pytorch numpy torchvision -c pytorch

@ -5,7 +5,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Install python and dependencies # Install python and dependencies
[ -f 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 [ -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 tensorflow==1.15.0 $script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.8 tensorflow==2.2
# Download mnist dataset # Download mnist dataset
[ -f mnist.npz ] || wget https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz [ -f mnist.npz ] || wget https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz