Ubuntu16.04 cuda9.0 tensorflow-gpu1.8 anaconda3 安装(学校GPU工作站创建实例教程)

0.安装环境及tf套餐选择

  • 环境:Ubuntu16.04LTS
  • tf套餐:
    • cuda9.0
    • anaconda3
    • tensorflow-gpu1.8

1.选择cuda9.0创建实例(不需要再管cuDNN的事,学校服务器已配好)

2.安装conda

bash Anaconda3-5.1.0-Linux-x86_64.sh //注意安装时选择添加conda的bin路径到~/.bashrc中,默认是no,选择yes
source ~/.bashrc

3.换conda源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

4.换pip源

cd ~
mkdir -p .config/pip/
cd .config/pip/
vi pip.conf

添加内容如下:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

5.创建虚拟环境

conda create -n tf pip python=3.6

6.进入创建的虚拟环境,安装tensorflow-gpu1.8

conda activate tf
pip install tensorflow-gpu==1.8

7.安装tensorlayer(可选)

pip install tensorlayer

猜你喜欢

转载自www.cnblogs.com/MrZJ/p/9755151.html
今日推荐