选择带GPU的镜像后
更新源,安装必要依赖
sudo apt update
sudo apt install python3-pip python3-dev python3-tk
sudo apt install python3-yaml
sudo apt install cmake
配置中文环境
sudo apt-get install language-pack-zh-hans
sudo vim /etc/environment
添加下面两行
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"
接着
sudo dpkg-reconfigure locales
pip3
pip3 install numpy
pip3 install pillow
pip3 install matplotlib
git
git clone https://github.com/pytorch/pytorch.git
git clone https://github.com/pytorch/vision.git
安装pytorch
cd pytorch
git submodule update --init
python3 setup.py install
安装vision
cd vision
python3 setup.py install
配置zsh
sudo apt install zsh
个人配置
git clone https://github.com/qianhaoq/pytorch_test.git
网友评论