# Download
wget https://tools.mindspore.cn/tools/conda/archiconda/Archiconda3-0.2.3-Linux-aarch64.sh

# Install
bash Archiconda3-0.2.3-Linux-aarch64.sh
# Please, press ENTER to continue
# >>> 
# Do you accept the license terms? [yes|no]
# [no] >>> yes
# [/root/archiconda3] >>> /home/miniconda3
# Do you wish the installer to initialize Archiconda3
# in your /root/.bashrc ? [yes|no]
# [no] >>> no

# Cancel certificate verification
source /home/miniconda3/bin/activate base
conda config --set ssl_verify false

# Create python env
umask 022
conda create -n ci python=3.7.6
source /home/miniconda3/bin/activate ci

# Upgrade conda pip
conda install pip==20.1.1

# Install sault lib
pip install --upgrade pip
pip install paramiko
pip install pyyaml
pip install scp
pip install flask
pip install requests
pip install flask_restful
pip install argparse
pip install pytest
pip install virtualenv
pip install nose
pip list

#Install test lib
pip install pytest
pip install pytest-xdist
pip install 'setuptools>=40.8.0'
pip install 'wheel>=0.32.0'
pip install 'numpy>=1.17.0'
pip install 'pillow>=6.2.0'
pip install 'protobuf>=3.8.0'
pip install 'asttokens>=1.1.13'
pip install 'scipy==1.3.3'
pip install 'easydict>=1.9'
pip install 'sympy>=1.4'
pip install 'cffi>=1.13.2'
pip install 'decorator>=4.4.0'
pip install 'matplotlib>=3.1.3'
pip install 'pybind11>=2.4.3'
pip install 'attrdict>=2.0.1'
pip install 'Click>=7.0'
pip install 'Flask>=1.1.1'
pip install 'Flask-Cors>=3.0.8'
pip install 'gunicorn>=19.9.0'
pip install 'itsdangerous>=1.1.0'
pip install 'Jinja2>=2.10.1'
pip install 'MarkupSafe>=1.1.1'
pip install 'marshmallow>=2.19.2'
pip install 'psutil>=5.6.1'
pip install 'six>=1.12.0'
pip install 'Werkzeug>=1.0.0'
pip install 'tabulate>=0.8.6'
pip install 'sklearn>=0.0'
pip install 'pandas>=1.0.2'
pip install 'grpcio>=1.29.0'
pip install gensim
pip list

# Install opencv
# https://tools.mindspore.cn/tools/ci/conda/archiconda/scripts/opencv/build-opencv.sh

# Install mmcv
pip install Cpython
# https://tools.mindspore.cn/tools/ci/conda/archiconda/scripts/mmcv/build-mmcv.sh

# Install pytorch
pip install numpy pyyaml setuptools cffi typing
# torch: https://tools.mindspore.cn/tools/conda/archiconda/scripts/torch/v1.5.0/build-torch-v1.5.0.sh
pip install torchvision

# Install h5py for tensorflow
conda install h5py

# Install tensorflow-1.14.0
pip install https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.14.0-buster/tensorflow-1.14.0-cp37-none-linux_aarch64.whl

# Install tensorflow-2.3.0
pip install https://github.com/lhelontra/tensorflow-on-arm/releases/download/v2.3.0/tensorflow-2.3.0-cp37-none-linux_aarch64.whl
# https://tools.mindspore.cn/tools/conda/archiconda/scripts/tensorflow/install-tensorflow.sh

# Install mindspore
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/0.6.0-beta/MindSpore/ascend/euleros_aarch64/mindspore_ascend-0.6.0-cp37-cp37m-linux_aarch64.whl
pip uninstall -y mindspore-ascend
