/home/ict-526/anaconda3/envs/neucon/lib/python3.7/site-packages/torch/cuda/__init__.py:125: UserWarning:
NVIDIA GeForce RTX 3080 Ti with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
If you want to use the NVIDIA GeForce RTX 3080 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
cuda version 확인 (11.6)
username@computername:~/ $ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Thu_Feb_10_18:23:41_PST_2022
Cuda compilation tools, release 11.6, V11.6.112
Build cuda_11.6.r11.6/compiler.30978841_0
gpu와 잘 붙었는지 확인.(python 코드이므로, idle에서 실행)
import torch
torch.cuda.is_available()
>>> True
torch.cuda.current_device()
>>> 0
torch.cuda.device(0)
>>> <torch.cuda.device at 0x7efce0b03be0>
torch.cuda.device_count()
>>> 1
torch.cuda.get_device_name(0)
>>> 'GeForce GTX 950M'
내가 생각한 해결책: neural reconstruction은 environment.yaml 파일을 제공한다. 내용은 다음과 같다.
name: neucon
channels:
# You can use the TUNA mirror to speed up the installation if you are in mainland China.
# - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
- pytorch
- defaults
- conda-forge
dependencies:
- python=3.7.9
- pytorch=1.6.0
- torchvision=0.7.0
- cudatoolkit=10.2
- ipython
- tqdm
- numba
- sparsehash # dependency for torchsparse
- pip
- pip:
- -r requirements.txt
- git+https://github.com/mit-han-lab/torchsparse.git
3080, 3080ti, 3090등은 cuda버전이 11이상이어야 하고, 이에 맞는 torch 버전은 최신 1.9 버전, 이에 맞는 torchsparse는 1.4이므로, 다음과 같이 바꿔본다.
name: neucon
channels:
# You can use the TUNA mirror to speed up the installation if you are in mainland China.
# - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
- pytorch
- defaults
- conda-forge
dependencies:
- python=3.9.3
- pytorch=1.7.0
- torchvision=0.7.0(??????????)
- cudatoolkit=11.6
- ipython
- tqdm
- numba
- sparsehash # dependency for torchsparse
- pip
- pip:
- -r requirements.txt
- git+https://github.com/mit-han-lab/torchsparse.git
'파이썬 공부 > 기초' 카테고리의 다른 글
파이썬 이중콜론 :: 의미 (0) | 2022.06.02 |
---|---|
[python] 알라딘 중고서점 스크래핑-3 (0) | 2021.12.21 |
[python] 알라딘 중고서점 스크래핑-2 (0) | 2021.12.21 |
알라딘 중고서점 가격 스크래핑(파이썬) (0) | 2021.12.21 |
리스트 옮기기(파이썬) (0) | 2021.01.20 |