yum install -y bzip2
# download anaconda and install
echo "download anaconda and install"
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh
sh Anaconda3-5.3.1-Linux-x86_64.sh -u
source ~/.bashrc
# change pip source to aliyun
echo "change pip source to aliyun"
if [ ! -d " ~/.pip/" ];then
mkdir ~/.pip
else
echo "pip existed"
fi
cat>~/.pip/pip.conf<
# change anaconda source to ustc
echo "change anaconda source to ustc"
cat>~/.condarc<<- https: defaultsshow_channel_urls: trueeof>
#gpu test file
cat>gpu_test.py<
# creat tf14 env
echo "creating tf14 env"
conda create -n tf14 python=3.7 -y
conda activate tf14
conda install tensorflow-gpu==1.14.0 -y
pip install torch torchvision -U
pip install numpy==1.15.4
python gpu_test.py
# creat tf20 env
echo "creating tf20 env"
conda create -n tf20 python=3.7 -y
conda activate tf20
conda install tensorflow-gpu==2.0.0 -y
pip install torch torchvision -U
pip install numpy==1.15.4
python gpu_test.py
->