Notice
Recent Posts
Recent Comments
Link
«   2026/02   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Tags
more
Archives
Today
Total
관리 메뉴

Trikang

[Ubuntu 20.04] CUDA 여러 개 설치하기 본문

개발 Tip

[Ubuntu 20.04] CUDA 여러 개 설치하기

Trikang 2025. 7. 23. 14:44

기존 11.2 사용 중. 11.8을 추가로 설치하고 싶다면

wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
sudo chmod 777 cuda_11.8.0_520.61.05_linux.run
sudo sh cuda_11.8.0_520.61.05_linux.run

 

이미 cuda가 있기에, 설치 과정이 조금 다름 -> CUDA Toolkit 11.8만 설치(Driver X)

 

 

CUDA 버전 변경법

먼저 현재 설치되어있는 cuda 버전 목록을 확인. 아래 명령어를 사용하거나, 아님 해당 경로 직접 들어가서 확인해도 됨.

ls -l /usr/local
출력>>
----------  1 - -    -- Jul 13  2021 cuda -> cuda-11.2
----------  1 - - -- Jul 13  2021 cuda-11.2
---------- 16 - - -- Jul 23 05:38 cuda-11.8

 

먼저 update-alternatives --install로 등록

sudo update-alternatives --install /usr/local/cuda cuda /usr/local/cuda-11.2 112
sudo update-alternatives --install /usr/local/cuda cuda /usr/local/cuda-11.8 118

 

그리고 --config 활용하여 선택할 수 있게 함

sudo update-alternatives --config cuda
출력>>
There are 2 choices for the alternative cuda (providing /usr/local/cuda).

  Selection    Path                  Priority   Status
------------------------------------------------------------
* 0            /usr/local/cuda-11.8   118       auto mode
  1            /usr/local/cuda-11.2   112       manual mode
  2            /usr/local/cuda-11.8   118       manual mode

참고

https://xoft.tistory.com/86

 

[Ubuntu] CUDA 설치 & Multi CUDA 설치

본 글에서는 CUDA 설치 방법에 대해 다룹니다. 특히 여러 오픈소스를 실행해야하는 경우, CUDA를 여러개 설치해야 하는 경우가 많이 발생하기에 Multi CUDA설치 방법까지 같이 정리했습니다. 1. 설치

xoft.tistory.com

 

Comments