From 22ff6433ae7d377affbbf6ba34e43373234d438e Mon Sep 17 00:00:00 2001 From: "Zheng, Qi" Date: Wed, 26 Oct 2022 16:58:06 +0800 Subject: [PATCH] Set conda python version as 3.8.10 to workaround non-PIE issues --- demos/python/flask/install_python_with_conda.sh | 2 +- demos/python/python_glibc/install_python_with_conda.sh | 2 +- demos/pytorch/install_python_with_conda.sh | 2 +- .../tensorflow/tensorflow_training/install_python_with_conda.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/python/flask/install_python_with_conda.sh b/demos/python/flask/install_python_with_conda.sh index 5281ae81..69ae2c71 100755 --- a/demos/python/flask/install_python_with_conda.sh +++ b/demos/python/flask/install_python_with_conda.sh @@ -8,4 +8,4 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # 2. Install python and dependencies to specified position [ -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.8 flask=1.1.2 flask-restful=0.3.8 +$script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.8.10 flask=1.1.2 flask-restful=0.3.8 diff --git a/demos/python/python_glibc/install_python_with_conda.sh b/demos/python/python_glibc/install_python_with_conda.sh index 431d15bc..f1dea4c4 100755 --- a/demos/python/python_glibc/install_python_with_conda.sh +++ b/demos/python/python_glibc/install_python_with_conda.sh @@ -8,5 +8,5 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # 2. Install python and dependencies to specified position [ -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.8 numpy=1.21.5 scipy=1.7.3 scikit-learn=1.0 pandas=1.3 Cython +$script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.8.10 numpy=1.21.5 scipy=1.7.3 scikit-learn=1.0 pandas=1.3 Cython diff --git a/demos/pytorch/install_python_with_conda.sh b/demos/pytorch/install_python_with_conda.sh index 74ffde51..d436c42e 100755 --- a/demos/pytorch/install_python_with_conda.sh +++ b/demos/pytorch/install_python_with_conda.sh @@ -8,4 +8,4 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # 2. Install python and dependencies to specified position [ -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.8 pytorch numpy torchvision -c pytorch +$script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.8.10 pytorch numpy torchvision -c pytorch diff --git a/demos/tensorflow/tensorflow_training/install_python_with_conda.sh b/demos/tensorflow/tensorflow_training/install_python_with_conda.sh index 90cf639d..c30953e3 100755 --- a/demos/tensorflow/tensorflow_training/install_python_with_conda.sh +++ b/demos/tensorflow/tensorflow_training/install_python_with_conda.sh @@ -5,7 +5,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # Install python and dependencies [ -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.8 tensorflow==2.2 +$script_dir/miniconda/bin/conda create --prefix $script_dir/python-occlum -y python=3.8.10 tensorflow==2.2 # Download mnist dataset [ -f mnist.npz ] || wget https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz