티스토리 뷰
Ubuntu 서버에 Anaconda 설치한다.
Anaconda 에 가상환경을 추가한다.
CUDA, cuDNN 버전에 맞는 Tensorflow GPU 를 설치한다.
1. Anaconda setup
- Anaconda 3 최신버전 다운: https://www.anaconda.com/products/individual
- 다운 된 파일실행 : Anaconda3-2022.10-Linux-x86_64.sh
sh Anaconda3-2022.10-Linux-x86_64.sh
- Anaconda 설치시 yes 했음.
- 설치 완료
done
installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>>
- conda init yes 함.
- vi ~/.bashrc 열어보면 환경 설정 있어야 함.
- source ~/.bashrc 로 적용해줘야 함
- (base) 가 붙는다. (base는 conda 의 default 가상 환경이다.)
간단한 conda 명령어
- 가상환경 생성: conda create --name=py38tf python=3.8
- 가상환경 확인: conda info -e
- 가상환경 접속: conda activate [name]
- 가상환경 전부삭제: conda remove [name] --all
2. Tensorflow-gpu 설치
- 가상환경을 하나 생성하고 설치를 진행한다.
- 설치가능한 Tensorflow GPU 버전 확인
https://www.tensorflow.org/install/source#gpu
소스에서 빌드 | TensorFlow
Check out sessions from the WiML Symposium covering diffusion models with KerasCV, on-device ML, and more. Watch on demand 이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English 소스에서 빌드 컬렉션을 사용해
www.tensorflow.org
이런 게 있었네.. 텐서플로우 에서 제원하는 쿠다와, cuDNN 버전이 있었다..
나의 경우, CUDA 11.4, cuDNN 8.2.4 버전을 미리 설치해놓았는데 지원하는 텐세플로우 GPU 가 없다...
다시 설치해보기 전에 최신 텐서플로우 버전으로 설치해보아야 겠다.
(이 내용 참고해서.. https://github.com/tensorflow/tensorflow/issues/55492#issuecomment-1089099691)
conda 환경에서 아래 명령어를 입력한다.
$ pip install tensorflow-gpu==2.11.0
설치 완료 후 테스트 해본다.
Test
$ python3
>>> from tensorflow.python.client import device_lib
>>> device_lib.list_local_devices()
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 16885780211228572650
xla_global_id: -1
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 617480192
locality {
bus_id: 1
links {
}
}
incarnation: 8603260971445364743
physical_device_desc: "device: 0, name: NVIDIA GeForce GTX 750 Ti, pci bus id: 0000:01:00.0, compute capability: 5.0"
xla_global_id: 416903419
]
GPU 출력된 것을 보니 설치가 잘 되었다.!
[환경구축] GTX 750 Ti, Ubuntu 18.04 (1) Nvidia driver, CUDA, cuDNN 설치
PC 스펙은 다음과 같다. 2015년 즈음(?) 조립 PC 로 구매했던 것으로 기억한다. 내 PC 기준으로 Nvidia driver, CUDA, cuDNN 설치한 내용을 정리한다. PC 사양 CPU: Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz 그래픽 카드: Ge
dotoriai.com
'AI' 카테고리의 다른 글
[프롬프트 엔지니어링] 1장. 생성형 AI, 진짜 똑똑한 걸까? (0) | 2025.05.30 |
---|---|
[AI] AI 음성 에이전트 (0) | 2023.01.31 |
[환경구축] GTX 750 Ti, Ubuntu 18.04 (1) Nvidia driver, CUDA, cuDNN 설치 (0) | 2022.12.19 |
[논문리뷰] LAS(Listen, Attend and Spell) (0) | 2022.04.26 |
[오디오] AI로 음성 녹음 파일 노이즈 제거하는 방법 (2) | 2022.04.14 |