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.

인기 글

사용자 작성 모듈 import 시 에러)(ModuleNotFoundError: No module named
파이썬 모듈을 만들고 테스트 할 때 ModuleNotFoundError: No module named 에러가 발생한 경우원인파이썬은 모듈을 불러올 때 모듈 설치 경로와 자신의...
오라클 클라우드 OCI 가입 드디어 성공 했습니다 (상세 후기)
2023년 2월 16일에 ‘오라클 클라우드 지급 검증 실패 글‘을 남긴 적이 있습니다.그 때 검색을 통해 해결 방법을 찾아 보았고, 당시 성공했던 분들의...
WSL2/Ubuntu 22.04 LTS에 Anaconda 설치 
WSL2/Ubuntu 환경에서 Python 버전별로 가상환경을 만드는 방법 중 그나마 Anaconda 방법이 좋은 것 같네요. 설치 방법은 간단합니다.1. apt update사용자...
AWS 인스턴스 유형 변경 방법
AWS 인스턴스 유형을 변경하기 위한 방법에는 다음 2가지가 있습니다.   1. 첫 번째 방법 AMI 이미지 생성 후 해당 이미지를 복원하여 신규 EC2 인스턴스를 생성하는...
[Ubuntu] ufw 방화벽 설정
ufw란?iptables 보다 쉽고 직관적으로 방화벽 설정을 할 수 있는 패키지ufw 상태 관리 명령어ufw의 상태를 관리하는 명령어# ufw 활성화 $ sudo...

BCT Ai Chatbot

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