Skip to content

Latest commit

Β 

History

History
91 lines (71 loc) Β· 2.54 KB

File metadata and controls

91 lines (71 loc) Β· 2.54 KB

Install TensorFlow GPU Version on Computer

A. CUDA and cuDNN

1. Install CUDA

ν˜Έν™˜λ˜λŠ” tensorflow-gpu, Python, CUDA, cuDNN ν™•μΈν•˜κΈ°

Windows: https://www.tensorflow.org/install/source_windows?hl=ko

Linux/Mac OS: https://www.tensorflow.org/install/source?hl=ko

Raspberry Pi: https://www.tensorflow.org/install/source_rpi?hl=ko

1-1. Install CUDA 9.0

https://developer.nvidia.com/cuda-90-download-archive μ—μ„œ μžμ‹ μ˜ ν™˜κ²½μ— λ§žλŠ” CUDA download

μ˜ˆμ‹œ ν™˜κ²½

Opertaing System : Windows
Architecture     : x86_64
Version          : 10
Installer Type   : exe (local)

μœ„ μ˜ˆμ‹œ ν™˜κ²½μΌ 경우의 λ‹€μš΄λ‘œλ“œ 링크 https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_win10-exe

1-2. Install CUDA 10.0 (2019-09-27-Fri κΈ°μ€€ pip install tensorflow-gpuλŠ” cuda10.dll ν•„μš” https://www.tensorflow.org/install/gpu)

https://developer.nvidia.com/cuda-10.0-download-archive μ—μ„œ μžμ‹ μ˜ ν™˜κ²½μ— λ§žλŠ” CUDA download

μ˜ˆμ‹œ ν™˜κ²½

Opertaing System : Windows
Architecture     : x86_64
Version          : 10
Installer Type   : exe (local)

μœ„ μ˜ˆμ‹œ ν™˜κ²½μΌ 경우의 λ‹€μš΄λ‘œλ“œ 링크 https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_411.31_win10

2. exe 파일 μ‹€ν–‰μœΌλ‘œ μ„€μΉ˜

3. Download cuDNN

Reference: https://developer.nvidia.com/cudnn

아이디가 μžˆλ‹€λ©΄ Login, μ—†λ‹€λ©΄ Join ν›„ Login

the Terms of the cuDNN Software License Agreement 에 λ™μ˜ ν›„ μžμ‹ μ˜ ν™˜κ²½μ— λ§žλŠ” cuDNN download

λ‹€μš΄λ‘œλ“œν•œ cuDNN νŒŒμΌμ€ unzip ν•œ ν›„ νŒŒμΌλ“€μ„ 볡사 λ˜λŠ” μž˜λΌλ‚΄κΈ° ν›„

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\9.0

μœ„ 디렉토리에 λΆ™μ—¬λ„£κΈ°

B. Install TensorFlow GPU With Anaconda

Reference: https://www.tensorflow.org/install/gpu

1. Create Virtual Environment

cmd λ˜λŠ” anaconda prompt λ₯Ό μ‹€ν–‰ν•œλ‹€.

> conda create -n tensorflow python=3.6 anaconda

μœ„ 'tensorflow' λŠ” κ°€μƒν™˜κ²½μ˜ 이름이닀.

2. Verify Virtual Environmnet

> conda info --envs

3. Install TensorFlow

κ°€μƒν™˜κ²½ 'tensorflow λ₯Ό activate ν•œλ‹€.

> activate tensorflow
> pip install tensorflow-gpu

4. Verify Install

> python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"

5. Pycharm Interpreter Setting

File>Settings
Project:PyCharmProjects>Project Interpreter

ν†±λ‹ˆλ₯Ό ν΄λ¦­ν•˜κ³  add λ₯Ό ν΄λ¦­ν•œλ‹€.

System Interpreter>Interpreter>

κ°€μƒν™˜κ²½ directory 에 μžˆλŠ” python.exe λ₯Ό μ„ νƒν•œλ‹€.