occlum/demos/python/python_glibc/install_python_with_conda.sh
2021-07-14 15:04:42 +08:00

13 lines
629 B
Bash
Executable File

#!/bin/bash
set -e
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# 1. Init occlum workspace
[ -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
[ -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=1.18.1 pandas=0.24.2 scipy=1.3.1 Cython scikit-learn=0.21.1