1. Install Ubuntu 17.10 first

The process a little

Only recommended in this section for practical convenience, please install the Desktop version.

2. Install and configure Python and Pip

This is the case when PYTHon3 has been installed, with version 3.6.3 installed, but python3 is not linked.

Enter the command:

To install pip3, enter the following command:

Type Y, press Enter

Install Pytorch

On Pytorch’s home page, http://pytorch.org, there are installation commands for different OS, installation modes, Python versions, and CUDA versions to boot.

In view of personal preference, I prefer to use PIP method, because it is less brain.

I installed Ubuntu 17.10 with Python 3.6 and no graphics card. The following command is used: Pip3 install http://download.pytorch.org/whl/cpu/torch-0.3.1-cp36-cp36m-linux_x86_64.whl pip3 install torchvision

Pip3 Install Torch TorchVision Pip3 Install Torch TorchVision Pip3 Install Torch TorchVision Pip3 Install Torch TorchVision Pip3 Install Torch TorchVision Pip3 Install Torch TorchVision Pip3 Install Torch TorchVision

However, it is important to note that CUDA and CUDNN will need to be installed first if you choose the Pytorch version with the GPU. To install CUDA 8.0 and CUDNN 5.1, run the following command:

Download CUDA 8.0 deb wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-d eb

wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda-repo-ubuntu1604-8-0-local-cublas-performance-update_8 0.61 1 _amd64 – deb

Sudo DPKG -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb

sudo apt-get update

sudo apt-get install cuda

Download CUDNN 5.1: wget https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v5.1/prod_20161129/8.0/cudnn-8.0-linux-x64-v5.1-tgz

The tar ZXVF cudnn – 8.0 – Linux – x64 – v5.1 – TGZ

cd cuda/include

Sudo cp cudnn.h /usr/local/cuda/include

cd .. /lib64

sudo rm -rf libcudnn.so libcudnn.so.5

Sudo ln -s libcudnn.so.5.1.5 libcudnn.so.5

sudo ln -s libcudnn.so.5 libcudnn.so

4, verify input command:

The installation is now complete. If you have a fast Internet connection at home, the whole process should take less than 10 minutes.