Today I../Today I Learned

딥러닝 환경설정 관련 우분투 명령어

HJChung 2020. 7. 17. 16:06

1. nvidia Driver, CUDA, cuDNN 설치 전 설치유무 확인 명령어

<nvidia Driver confirm command>

nvidia-smi

 

<CUDA toolkit confirm command>

nvcc -V

 

<cuDNN confirm command>

cat /usr/local/cuda/include/cudnn.h | grep MAJOR -A 2

 

<nccl confirm command>

cat /usr/include/nccl.h | grep MAJOR -A 2

 

<file directory command>

whereis [file name]

 

 

watch -n 1 -d nvidia-smi

 

2. pytorch, tensorflow 설치 및 conda 가상환경 생성 명령어

<jupyter notebook install>

conda install jupyter notebook

 

<torch install command>
conda install pytorch torchvision

<create conda virtual environment command>  
conda create -n [virtual environment name]


<tf install command>
conda install tensorflow-gpu==1.13.1

 

<가상환경 목록보기>

conda info --envs

 

<가상환경 실행>

activate [가상환경 이름]

 

<가상환경 종료>

deactivate [가상환경 이름]

 

<gpu사용 중인지 확인>

tf.test.is_gpu_available(

        cuda_only=False,

        min_cuda_compute_capability=None

)

 

 

https://niceman.tistory.com/85

 

파이썬 아나콘다(Anaconda) - 기초 사용법 정리(1), 가상환경 생성

Python 아나콘다(Anaconda) - 기본 설명 ① Anaconda(아나콘다) - Python 기반의 데이터 분석에 필요한 오픈소스를 모아놓은 개발 플랫폼이라고 볼 수 있습니다. - 가상환경 관리자 제공 - 패키지 관리자

niceman.tistory.com

https://dandyrilla.github.io/2018-10-01/conda-env/

 

아나콘다(Anaconda) 가상환경 사용법

아나콘다(Anaconda)에서 지원하는 가상환경을 통해 한 운영체제 위에 여러 python 환경을 독립적으로 설정할 수 있습니다. 가상환경을 만들고 사용하는 기본적인 방법을 알아봅니다.

dandyrilla.github.io

https://jupyter.org/community 

anaconda 가상환경에 jupyter notebook 설치

 

Project Jupyter

The Jupyter Notebook is a web-based interactive computing platform. The notebook combines live code, equations, narrative text, visualizations, interactive dashboards and other media.

jupyter.org