之前的ubuntu16.04崩掉,分辨率不能修改。重装了ubuntu18.04,也尝试下tensorflow-GPU
本人经历过某次安装ubuntu,添加引导时误删了win10引导!导致windows进不去后,以后安装ubuntu时均直接与windows共存安装,不用说太多,一直这么过来的,也没什么问题出现。共存安装ubuntu引导是默认装在windows硬盘C盘的系统EFI分区,这样ubuntu崩掉后不会影响win,记得做好ubuntu的backup就好。
与win共存安装分区:貌似默认只分配了548M的EFI分区,8G的swap,与内存一样大。剩下的全在/根目录(相当于win的C盘)。
swap可以自己永久扩充,问题不大,我分了内存的两倍16G。剩下的接近200G全在/根目录(相当于win的C盘),个人认为这样问题也不大,而且不会出现装软件太多,存储不够的情况。怎么装见仁见智吧。
扩充交换空间swap:https://www.iteye.com/blog/huanghua-sina-com-1535095
由于ubuntu18.04默认安装有python3.6.8,够用啦,设置python3为环境变量首选项:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
环境:ubuntu18.04,Nvidia GTX 1050,软件和更新 - 附加驱动 -> Nvidia-driver-390。
须安装:CUDA9.0+CUDNN7,安装配置tensorflow-GPU1.10.1
tensorflow环境配置的教程很多,自己参考吧,根据硬件条件,我用的是这个:请移步https://blog.csdn.net/u014670893/article/details/82467384
如果您用的也是这个版本的配置,这篇贴是没问题的,亲测过!
注意在安装ubuntu后,为了加速安装一些软件和python包,最好把apt-get 和 pip install都改成阿里云源:
1、apt-get修改下载源为阿里源:
ctrl+alt+T打开终端
#首先,备份一下下载源的文件,
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
#打开文件
sudo gedit /etc/apt/sources.list
#把文件中之前所有的注释掉
拷进去下面的代码:
这是适用于ubuntu18.04的阿里源
对于不同ubuntu版本的阿里源其实是一样的,只是每个ubuntu版本的英文名(开发代号)其实不一样。
见此连接:https://blog.csdn.net/qq756684177/article/details/91863372
比如,ubuntu14.04名字是Trusty Tahr ,相应的,就要把下面代码中的bionic改为Trusty
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
最后,sudo apt-get update 就ok了
2、pip install 更换阿里源
ctrl+alt+T打开终端
mkdir ~/.pip
vim ~/.pip/pip.conf
没有vim的话,会提示安装,直接sudo apt-get install vim,顺便试试刚改的源的速度
再复制以下内容到pip.conf就可以了
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
[install]
trusted-host=mirrors.aliyun.com
速度上M/s是没问题的
比较懒,很多贴上链接,也省得大家找了,希望对您有帮助!