«Ubuntu Pytorch without NVDIA (AMD FUCK)»
by pluvet on Nov 1, 2019

Config ss proxy

sudo apt-get install shadowsocks-libev

config file

mkdir ssr && cd $_
vi ss.json

install privoxy

sudo apt install privoxy
sudo gedit /etc/privoxy/config

put this at first line (dont forget the dot in the end of line)

forward-socks5 / . 

press ctrl-s

vi ~/.bashrc 

function proxy_off(){
    unset http_proxy
    unset https_proxy
    unset ftp_proxy
    unset rsync_proxy
    echo -e "已关闭代理"

function proxy_on() {
    export no_proxy="localhost,,localaddress,.localdomain.com"
    export http_proxy=""
    export https_proxy=$http_proxy
    export ftp_proxy=$http_proxy
    export rsync_proxy=$http_proxy
    export HTTP_PROXY=$http_proxy
    export HTTPS_PROXY=$http_proxy
    export FTP_PROXY=$http_proxy
    export RSYNC_PROXY=$http_proxy
    echo -e "已开启代理"
source ~/.bashrc 
service privoxy restart
wget google.com


download the installer


bash Miniconda3-latest-Linux-x86_64.sh

close terminal
open terminal

conda -V
conda 4.7.12



conda install pytorch torchvision cpuonly -c pytorch
* very fucking slow

if you are slow too:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
conda install pytorch torchvision cpuonly -c pytorch

if it's still slow too, like me. take a shower and await it get crash.(QwQ)

vi test.py

from __future__ import print_function
import torch
x = torch.rand(5, 3)

python test.py
tensor([[0.7863, 0.7570, 0.2269],
        [0.5199, 0.4517, 0.6182],
        [0.0156, 0.7750, 0.0581],
        [0.8170, 0.8023, 0.8132],
        [0.9738, 0.9165, 0.3282]])

This means it's ok.