Blog categories

Comments

CUDA 삭제 방법

CUDA 삭제 방법

Cuda와 관련된 여러 모듈을 하나씩 삭제

sudo apt remove --purge nvidia*
sudo apt remove --purge "*cublas*"
sudo apt remove --purge "*cuda*"
sudo apt remove --purge "nsight*"

다음과 같이 한 번에 삭제 가능:

sudo apt remove --purge "nvidia*" "*cublas*" "*cuda*" "nsight*"

다음과 같이 apt-get purge를 이용하여도 무방하다.

sudo apt-get purge nvidia*

관련 저장소 및 파일 삭제

sudo rm /etc/apt/sources.list.d/cuda*
sudo rm -rf /usr/local/cuda*

Auto remove, auto clean 수행

sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get update

설치 확인

$ nvcc --version
$ nvidia-smi

CUDA 설치 후, nvcc 명령이 동작하지 않는다면:

Command 'nvcc' not found

PATH 추가

$ vim ~/.bashrc

CUDA를 처음 설치하거나 /usr/local/cuda 디렉터리를 모두 잘 정리한 경우 다음과 같이 기본 폴더 사용

#CUDA Toolkit
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/lib64:$LD_LIBRARY_PATH

이미 CUDA를 설치한 적이 있는 경우 다음과 같이 버전 명시:
-> 예제: cuda-13.0 버전 설치

export PATH=/usr/local/cuda-13.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-13.0/lib64:/lib64:$LD_LIBRARY_PATH

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

div#stuning-header .dfd-stuning-header-bg-container {background-image: url(https://tech.sangron.com/wp-content/uploads/sites/2/2018/04/ubuntu_wallpaper_background.jpg);background-color: #3f3f3f;background-size: cover;background-position: top center;background-attachment: initial;background-repeat: no-repeat;}#stuning-header div.page-title-inner {min-height: 350px;}#main-content .dfd-content-wrap {margin: 0px;} #main-content .dfd-content-wrap > article {padding: 0px;}@media only screen and (min-width: 1101px) {#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars {padding: 0 0px;}#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars > #main-content > .dfd-content-wrap:first-child,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars > #main-content > .dfd-content-wrap:first-child {border-top: 0px solid transparent; border-bottom: 0px solid transparent;}#layout.dfd-portfolio-loop > .row.full-width #right-sidebar,#layout.dfd-gallery-loop > .row.full-width #right-sidebar {padding-top: 0px;padding-bottom: 0px;}#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars .sort-panel,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars .sort-panel {margin-left: -0px;margin-right: -0px;}}#layout .dfd-content-wrap.layout-side-image,#layout > .row.full-width .dfd-content-wrap.layout-side-image {margin-left: 0;margin-right: 0;}