Anaconda+TensorFlow+CUDA

2016年11月07日

usermod -a -G ftp tony

https://zhuanlan.zhihu.com/p/22678496

Anaconda 安装包可以到 Index of /anaconda/archive/ 下载。

conda config –add channels ‘https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/’ conda config –set show_channel_urls yes

~/.condarc

channels:

  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

    - conda-forge

    - defaults

    show_channel_urls: true

修改pip软件源需要修改 ~/.pip/pip.conf(没有就创建一个)文件,

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

https://www.tensorflow.org/versions/master/get_started/os_setup.html

Python 2.7

$ conda create -n tensorflow python=2.7

Python 3.4

$ conda create -n tensorflow python=3.4

Python 3.5

$ conda create -n tensorflow python=3.5

source activate tensorflow

Ubuntu/Linux 64-bit, CPU only, Python 2.7

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl

Ubuntu/Linux 64-bit, GPU enabled, Python 2.7

Requires CUDA toolkit 7.5 and CuDNN v5. For other versions, see “Installing from sources” below.

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl

Mac OS X, CPU only, Python 2.7:

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0rc1-py2-none-any.whl

Mac OS X, GPU enabled, Python 2.7:

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.11.0rc1-py2-none-any.whl

Ubuntu/Linux 64-bit, CPU only, Python 3.4

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp34-cp34m-linux_x86_64.whl

Ubuntu/Linux 64-bit, GPU enabled, Python 3.4

Requires CUDA toolkit 7.5 and CuDNN v5. For other versions, see “Installing from sources” below.

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0rc1-cp34-cp34m-linux_x86_64.whl

Ubuntu/Linux 64-bit, CPU only, Python 3.5

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp35-cp35m-linux_x86_64.whl

Ubuntu/Linux 64-bit, GPU enabled, Python 3.5

Requires CUDA toolkit 7.5 and CuDNN v5. For other versions, see “Installing from sources” below.

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0rc1-cp35-cp35m-linux_x86_64.whl

Mac OS X, CPU only, Python 3.4 or 3.5:

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0rc1-py3-none-any.whl

Mac OS X, GPU enabled, Python 3.4 or 3.5:

(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.11.0rc1-py3-none-any.whl

Python 2

(tensorflow)$ pip install –ignore-installed –upgrade $TF_BINARY_URL

Python 3

(tensorflow)$ pip3 install –ignore-installed –upgrade $TF_BINARY_URL