makeBCT

#AI #OpenAI #Chatbot #Cloud #WordPress

윈도우 환경 tensorflow와 pytorch 설치

OS: Windows 11
그래픽카드: NVIDIA GeForce RTX 2080 SUPER x 2
Python: (env) 3.7.3

1. Cuda & cuDNN 다운로드 및 설치

현재 환경에 최적화 해서 설치하는 것을 권장

Cuda 설치: 별도 계정 필요 없이 다운로드 가능함
download: CUDA Toolkit Archive | NVIDIA Developer

cuDNN 설치: nvidia developer 계정 필요함.
download: CUDA Deep Neural Network (cuDNN) | NVIDIA Developer

Cuda 경우 다운로드 받은 파일(EXE)을 실행하여 설치 진행하고, cuDNN 경우는 다운로드 받은 ZIP 파일 압축 해제한 후 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6 에 bin, include, lib 폴더 복사하여 설치함. 설치 이후 환경 변수에 하단 추가

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\lib

2. Tensorflow GPU 설치

다음과 같이 pip로 설치 가능함

pip install tensorflow-gpu==2.8.0

3. Pytorch 설치

나의 환경에 맞는 명령어를 찾아야 함. https://pytorch.org/get-started/locally/

conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia

4. 테스트 수행

import tensorflow as tf

print(tf.__version__)
2.8.0


tf.test.is_built_with_cuda()
True


tf.test.gpu_device_name()

2023-03-16 12:01:44.360450: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-03-16 12:01:46.841322: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /device:GPU:0 with 5949 MB memory: -> device: 0, name: NVIDIA GeForce RTX 2080 SUPER, pci bus id: 0000:01:00.0, compute capability: 7.5
2023-03-16 12:01:46.843892: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /device:GPU:1 with 5949 MB memory: -> device: 1, name: NVIDIA GeForce RTX 2080 SUPER, pci bus id: 0000:02:00.0, compute capability: 7.5
‘/device:GPU:0’

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

인기 글

Ubuntu 22.04 LTS에 Python 3.8 or 3.9 설치 방법
서버 : Vultr 클라우드OS: Ubuntu 22.04 LTS사용자 계정 생성하여 설치 진행함1. Start with the system updatesudo apt update...
오라클 클라우드 OCI 가입 드디어 성공 했습니다 (상세 후기)
2023년 2월 16일에 ‘오라클 클라우드 지급 검증 실패 글‘을 남긴 적이 있습니다.그 때 검색을 통해 해결 방법을 찾아 보았고, 당시 성공했던 분들의...
WSL2/Ubuntu 22.04 LTS에 Anaconda 설치 
WSL2/Ubuntu 환경에서 Python 버전별로 가상환경을 만드는 방법 중 그나마 Anaconda 방법이 좋은 것 같네요. 설치 방법은 간단합니다.1. apt update사용자...
사용자 작성 모듈 import 시 에러)(ModuleNotFoundError: No module named
파이썬 모듈을 만들고 테스트 할 때 ModuleNotFoundError: No module named 에러가 발생한 경우원인파이썬은 모듈을 불러올 때 모듈 설치 경로와 자신의...
Permission denied (publickey) 해결 방법
Plesk에서 생성된 system user로 ftp 접속 시 다음과 같은 에러 메시지가 발생하면서 접속이 되지 않습니다.상태: 152.67.193.32:49152에 연결... 응답: fzSftp...

BCT Ai Chatbot

답변을 준비중입니다 . . .