Ubuntu Deep learning Environment Building Tensorflow+pytorch

Source: Internet
Author: User
Tags pytorch

Current Computer Configuration: Ubuntu 16.04 + GTX1080 Graphics

Configuring a deep learning environment, using Tsinghua Source to install a Miniconda environment is a very good choice. In particular, today found Conda install-c Menpo opencv3 A command can be smoothly installed on the OPENCV, before their own time also encountered a lot of errors. Conda installation of the TensorFlow and pytorch two kinds of framework is also very convenient, for not good at source code compilation I was the best choice right.

So the general process is: Install the graphics driver-install cuda 8.0--install cudnn--install miniconda--install various calculation packages

The command is as follows:

Installation drive

sudo add-apt-repository Ppa:graphics-drivers/ppa

sudo apt-get update

sudo apt-get install nvidia-367

sudo apt-get install Mesa-common-dev

sudo apt-get install Freeglut3-dev

Reboot system for GTX1080 graphics driver to take effect

Download Cuda 8.0 Run file

sudo sh cuda_8.0.61_375.26_linux.run

Q Fast Forward skip, prompts whether to install XXXX select n

Configuring environment variables to ~/.BASHRC

Export path=/usr/local/cuda-8.0/bin/: $PATH

Export ld_library_path= "/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/extras/cupti/lib64"

Installation CUDNN is relatively simple, after extracting the corresponding files copied to the corresponding Cuda directory can be

sudo cp cudnn.h/usr/local/cuda/include/#复制头文件

sudo cp lib*/usr/local/cuda/lib64/#复制动态链接库

sudo rm-rf libcudnn.so libcudnn.so.6 #删除原有动态文件

sudo ln-s libcudnn.so.6.0.21 libcudnn.so.6 #生成软链接

sudo ln-s libcudnn.so.6 libcudnn.so #生成软链接

Installing Miniconda

Configure Tsinghua Source

Download Miniconda (python3.6)

Bash miniconda3-latest-linux-x86_64.sh

Install version Tensorflow-gpu

Conda install-y tensorflow-gpu==1.4.1

Pytorch Official website installation is very simple not to write

Ubuntu Deep learning Environment Building Tensorflow+pytorch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.