#!/bin/bash

source /home/miniconda3/bin/activate ci

# Install lib(conda or pip)
#conda install numpy ninja pyyaml mkl mkl-include setuptools cffi typing
#pip install numpy ninja pyyaml mkl mkl-include setuptools cffi typing

# Download code from github
cd /tmp
rm -rf pytorch
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
git checkout v1.1.0
git submodule sync
git submodule update --init --recursive

# Install pytorch
cd /tmp/pytorch
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py install
