전체 글 31

RTX 3090 Tensorflow GPU 동작확인

tf-nightly 2.7.0-dev20210806 버전 기준으로 설명함. 1. Tensorflow 설치 확인 from tensorflow.python.client import device_lib import tensorflow as tf tf.__version__ 2. Cuda 및 GPU 동작 확인 print(tf.test.is_built_with_cuda()) print(tf.test.is_built_with_gpu_support()) 3. physical_device 확인 physical_devices = tf.config.list_physical_devices('GPU') physical_devices 4. 사용 가능한 cpu 및 gpu 확인 (여기에서 gpu가 보여야함) local_devices..

[Install] RTX 3090, cuda 11.2 Tensorflow-gpu 설치

※ 경험한 바로는 3090에 기본 Tensorflow-gpu를 설치하면 tensorflow가 gpu를 똑바로 잡지 못했다. (이유는 아직도 모르겠음) [해결방법] - tensorflow nightly 버전을 이용한다. - nightly 버전 : 안정화된 tensorflow 버전이 아닌 매일매일 개발되고 있는 버전. - 기존의 tensorflow와 똑같이 사용하면 된다. - 아니면 tensorflow-gpu 2.4 버전을 사용한다. (다른 라이브러리들과 버전 충돌 주의) $ pip3 install tf-nightly $ pip3 install tensorflow-gpu==2.4.0 (참고) https://pypi.org/project/tf-nightly/

[nvtop] GPU 사용량 확인

※ Window의 작업관리자, ubuntu의 htop처럼 GPU의 사용량을 확인하게 해주는 nvtop 사용법. ※ 사용환경 : Ubuntu LTS 20 - nvtop 설치 $ sudo apt install nvtop sudo가 없을 경우 $ apt-get install -y sudo 먼저 하고 nvtop 설치 - 설치 및 동작 확인 $ nvtop - apt로 nvtop이 깔리지 않을 때 $ sudo apt install cmake libncurses5-dev libncursesw5-dev git $ git clone https://github.com/Syllo/nvtop.git GitHub - Syllo/nvtop: AMD and NVIDIA GPUs htop like monitoring tool AMD..

Setting, Error/GPU 2021.08.09

[Install] RTX 3090, cuda 11.2 Pytorch 설치

※ Docker container 안에 cuda와 호환되는 pytorch 설치 ※ [Error] no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. 에러 해결법 ※ 사용환경 : RTX 3090, cuda 11.2 - 본인의 pip 환경에 따라서 pip, pip3 선택해서 설치 pip : python2 pip3 : python3 더보기 Error: Command 'pip3' not found, but can be installed with 에러가 ..

[Install] GPU 환경세팅 (CUDA)

※ GPU를 사용하기 위한 cuda 및 GPU 드라이버 설치 ※ 사용환경 : Ubuntu LTS 20, RTX 3090 0. 사용환경 update $ sudo apt update 더보기 Error : sudo command not found 가 뜬다면 $ apt-get install -y sudo 1. nvidia-driver 설치 $ sudo apt search nvidia-driver 더보기 해당 apt 버전에 맞는 nvidia 드라이버 버전을 보여준다. 나오는 드라이버 중 원하는 것을 설치하면 되는데, 최신 버전은 아직 불안정할 수 있으므로 최신버전의 아래 단계를 추천한다. 아니면 $ ubuntu-drivers devices 위의 명령어로 우분투에서 추천하는 드라이버를 확인하는 방법도 있다. $ s..

Setting, Error/GPU 2021.08.09

[Jupyter] Jupyter notebook 비밀번호 설정

※ Jupyter notebook 토큰 없이 비밀번호로 실행하기 - 비밀번호 설정하기 $ jupyter notebook --generate-config $ jupyter notebook password ▷ 원하는 비밀번호 입력 - 비밀번호를 변경하고 싶을 때에도 동일한 명령어 입력 $ jupyter notebook password ▷ 변경하고자 하는 비밀번호 입력 $ jupyter notebook --allow-root --ip=x.x.x.x --port=xxxx --allow-root : root 권한으로 jupyter notebook을 실행할 수 있게 함 --ip=x.x.x.x : 해당 ip에로만 접속이 가능하게 함 (0.0.0.0으로 설정하면 모든 ip 허용) --port=xxxx : 해당 port..

[Error] systemctl start docker 에러

※ Docker process 자체를 시스템에서 시작할 수 없어 나타나는 에러 * 에러 내용 docker.service: Main process exited, code=exited, status=1/FAILURE docker.service: Failed with result 'exit-code'. Failed to start Docker Application Container Engine. * 해결법 - 먼저 기본적으로 컴퓨터 재부팅부터 해보고 되지 않을 경우에만 실행하기를 권장드립니다. ▶ 저는 재부팅을 하고 나서 대부분 도커가 정상적으로 실행되는 경우가 많았습니다. - 직접 docker daemon을 활용하여 Docker 실행 (되는 경우도 있고, 안 되는 경우도 있다고 한다) $ sudo docke..

[Error] Error response from daemon: could not select device driver with capabilities: [gpu_name] Error: failed to start containers: [container_name]

※ nvidia-docker에서 container를 실행하지 못하는 오류 * 해결법 - 먼저 기본적으로 컴퓨터 재부팅부터 해보고 되지 않을 경우에만 실행하기를 권장드립니다. ▶ 저는 재부팅을 하고 나서 대부분 도커가 정상적으로 실행되는 경우가 많았습니다. - 관련 Docker 모듈 재설치 $ distribution=$(. /etc/os-release;echo $ID$VERSION_ID) $ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - $ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc..

Setting, Error/GPU 2021.08.06