{"id":64,"date":"2017-06-09T13:53:16","date_gmt":"2017-06-09T04:53:16","guid":{"rendered":"https:\/\/dong1lkim.oboki.net\/?p=64"},"modified":"2019-09-01T22:21:50","modified_gmt":"2019-09-01T13:21:50","slug":"ubuntu-cuda-%ec%84%a4%ec%b9%98","status":"publish","type":"post","link":"https:\/\/oboki.net\/workspace\/system\/linux\/ubuntu-cuda-%ec%84%a4%ec%b9%98\/","title":{"rendered":"[Ubuntu] CUDA \uc124\uce58"},"content":{"rendered":"<h1>Ubuntu 16.04 CUDA \uc124\uce58\ud558\uae30<\/h1>\n<blockquote><p>\n  Ubuntu 16.04 \ud658\uacbd\uc5d0\uc11c CUDA \uc124\uce58\n<\/p><\/blockquote>\n<h2>\uc0ac\uc804 \uc900\ube44<\/h2>\n<h3>nvidia driver<\/h3>\n<p><a href=\"https:\/\/oboki.net\/workspace\/system\/linux\/ubuntu-nvidia-graphic-driver-%EC%84%A4%EC%B9%98\/\"><a href=\"https:\/\/oboki.net\/workspace\/system\/linux\/ubuntu-nvidia-graphic-driver-%EC%84%A4%EC%B9%98\/\">https:\/\/oboki.net\/workspace\/system\/linux\/ubuntu-nvidia-graphic-driver-%EC%84%A4%EC%B9%98\/<\/a><\/a><\/p>\n<h3>Download CUDA local installer(.run)<\/h3>\n<p><a href=\"https:\/\/developer.nvidia.com\/cuda-downloads\"><a href=\"https:\/\/developer.nvidia.com\/cuda-downloads\">https:\/\/developer.nvidia.com\/cuda-downloads<\/a><\/a><\/p>\n<p><code>cuda_8.0.61_375.26_linux-run<\/code><\/p>\n<h3>Remove any other installation<\/h3>\n<pre><code class=\"bash\">#sudo apt-get purge nvidia-cuda*\n#sudo apt-get purge nvidia-cuda*\n#sudo apt-get purge nvidia-*\n\nsudo apt-get --purge remove 'cuda*'\nsudo apt-get autoremove --purge 'cuda*'\n\nsudo rm -rf \/usr\/local\/cuda-*\nsudo rm -rf \/usr\/local\/cuda\n<\/code><\/pre>\n<h2>\uc124\uce58<\/h2>\n<h3>Logout from GUI and change boot mode to Command-line prompts<\/h3>\n<h4>Press [CTRL] + [ALT] + [F2]<\/h4>\n<p>\ucf58\uc194\uc5d0\uc11c \uc9c4\ud589\ud558\ub294 \uacbd\uc6b0 command-line \ud658\uacbd\uc73c\ub85c \ubcc0\uacbd\ud574\uc900\ub2e4. ssh \ud130\ubbf8\ub110\ub85c \uc811\uc18d\ud574\uc11c \uc124\uce58\ud558\ub294 \uacbd\uc6b0\uc5d0\ub294 \uadf8\ub0e5 \uc9c4\ud589\ud558\uba74 \ub428.<\/p>\n<h4>Stop lightdm<\/h4>\n<p><code>sudo service lightdm stop<\/code><\/p>\n<h4>blacklist-nouveau.conf \ud30c\uc77c \uc0dd\uc131<\/h4>\n<p><code>sudo vi \/etc\/modprobe.d\/blacklist-nouveau.conf<\/code><\/p>\n<pre><code class=\"conf\">blacklist nouveau\noptions nouveau modeset=0\n<\/code><\/pre>\n<h4>Update initramfs<\/h4>\n<p><code>sudo update-initramfs -u<\/code><\/p>\n<h3>Run installer<\/h3>\n<p><code>sudo .\/cuda_8.0.61_375.26_linux-run --override<\/code><\/p>\n<h3>\ud658\uacbd \ubcf5\uad6c<\/h3>\n<h4>blacklist-nouveau.conf \ud30c\uc77c \uc218\uc815<\/h4>\n<p><code>sudo vi \/etc\/modprobe.d\/blacklist-nouveau.conf<\/code><\/p>\n<pre><code class=\"conf\">#blacklist nouveau\n#options nouveau modeset=0\n<\/code><\/pre>\n<h4>Update initramfs<\/h4>\n<p><code>sudo update-initramfs -u<\/code><\/p>\n<h4>Start lightdm<\/h4>\n<p><code>sudo service lightdm start<\/code><\/p>\n<h4>reboot<\/h4>\n<p><code>sudo reboot now<\/code><\/p>\n<h2>Install CUDA package<\/h2>\n<p><code>sudo apt-get install cuda<\/code><\/p>\n<h2>\uc124\uce58 \ud655\uc778<\/h2>\n<p><code>\/usr\/local\/cuda<\/code> \uacbd\ub85c\uc5d0 \ubc14\uc774\ub108\ub9ac\uc640 \ub77c\uc774\ube0c\ub7ec\ub9ac\uac00 \uc0dd\uc131\ub3fc \uc788\ub294\uc9c0 \ud655\uc778\ud558\uace0, \uc544\ub798 \uba85\ub839\uc73c\ub85c \uadf8\ub798\ud53d \ub4dc\ub77c\uc774\ubc84\uc640 <code>nvcc<\/code>\uac00 \uc798 \ub3d9\uc791\ud558\ub294\uc9c0 \ud655\uc778\ud55c\ub2e4.<\/p>\n<p><code>nvcc --version<\/code><\/p>\n<p><code>nvidia-smi<\/code><\/p>\n<p>CUDA Sample \uc2e4\ud589 \ud14c\uc2a4\ud2b8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 16.04 CUDA \uc124\uce58\ud558\uae30 Ubuntu 16.04 \ud658\uacbd\uc5d0\uc11c CUDA \uc124\uce58 \uc0ac\uc804 \uc900\ube44 nvidia driver https:\/\/oboki.net\/workspace\/system\/linux\/ubuntu-nvidia-graphic-driver-%EC%84%A4%EC%B9%98\/ Download CUDA local installer(.run) https:\/\/developer.nvidia.com\/cuda-downloads cuda_8.0.61_375.26_linux-run Remove any other installation #sudo apt-get purge nvidia-cuda* #sudo apt-get purge nvidia-cuda* #sudo apt-get purge nvidia-* sudo apt-get &#8211;purge remove &#8216;cuda*&#8217; sudo apt-get autoremove &#8211;purge &#8216;cuda*&#8217; sudo rm -rf \/usr\/local\/cuda-* sudo rm -rf \/usr\/local\/cuda \uc124\uce58 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[91,83,92,50],"class_list":["post-64","post","type-post","status-publish","format-standard","hentry","category-linux","tag-cuda","tag-linux","tag-ubuntu","tag-50"],"_links":{"self":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":9,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":1302,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/64\/revisions\/1302"}],"wp:attachment":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}