Win10和Ubuntu16雙系統(tǒng)
1春寿,正常安裝Win10。
2绑改,進(jìn)入? 此電腦--管理--磁盤管理兄一,壓縮卷或者刪除卷,為ubuntu預(yù)留磁盤空間造壮。
3,UltraISO制作Ubuntu安裝U盤费薄。
4栖雾,進(jìn)入U(xiǎn)buntu安裝,會(huì)發(fā)現(xiàn)已經(jīng)安裝WIn10析藕,安裝選項(xiàng)選其他。
5账胧,Ubuntu分區(qū)設(shè)置。在之前的預(yù)留磁盤空間分區(qū)筹煮, 1)根目錄 / 40000MB居夹,2)swap 4000MB本冲,3)/boot 200 MB劫扒,4)/home 剩余。(分區(qū)大小可以自己調(diào)整)
特別注意添怔,記住/boot的Device贤旷,我的為/dev/sda6,這個(gè)因人而異遮晚。
然后選擇Device for boot loaderinstallation,為/boot的Device县遣,我的為/dev/sda6萧求。
6,安裝完成夸政,進(jìn)入Win10榴徐,利用EasyBCD,設(shè)置ubuntu啟動(dòng)項(xiàng)耗帕。
CUDA安裝
1袱贮,下載最新Nvidia顯卡驅(qū)動(dòng),CUDA和cuDNN攒巍。
2,不安轉(zhuǎn)CUDA自帶的驅(qū)動(dòng)闻坚,安轉(zhuǎn)Nvidia最新顯卡驅(qū)動(dòng)兢孝。
1)Disabling Nouveau
a. Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
????blacklist nouveau
????options nouveau modeset=0
b. Regenerate the kernel initramfs:
? ??sudo update-initramfs -u
2) adding "nomodeset" to the system's kernel boot parameters(防止有些時(shí)候進(jìn)入命令行會(huì)黑屏, ctrl+alt+F1)
? ? sudo gedit /etc/default/grub
set?
????GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
????GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
then
? ? sudo update-grub
3)?Reboot into text mode (runlevel 3)
? ? sudo service lightdm stop
? ? 輸入賬號(hào)密碼
? ? sudo init 3
? ? sudo sh NVIDIA-linux-XXX.run
? ? sudo reboot
特別注意:有時(shí)候會(huì)突然出現(xiàn)登陸界面輸入密碼無(wú)限循環(huán)無(wú)法登陸搀擂,ctrl+alt+F1進(jìn)入命令行界面卷玉,重來(lái)一次 3)。
4)安裝CUDA相种,跳過(guò)安裝顯卡驅(qū)動(dòng)那一步。
5)環(huán)境
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
如果是32位系統(tǒng)
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64
export CUDA_HOME=/usr/local/cuda-9.0
6)Cudnn
tar xvzf cudnn-X.X-linux-x64-vX.X-ga.tgz
sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
6)Anaconda國(guó)內(nèi)鏡像
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
6)Pip國(guó)內(nèi)鏡像
https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
修改?~/.config/pip/pip.conf?(Linux)
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple