환경에 계속 실패하다가 겨우 성공해서 백업용으로 쓴다.
<진행 순서>
1. WSL2 설치
2. Ubuntu 18.04 LTS 설치
3. NVIDIA 드라이버 설치
4. CUDA 설치
5. VS code 에서 코드 작성 + WSL에서 돌리기
<현재 GPU 스펙 >
- NVIDIA GeForce GTX 1660 Ti
<설치 Reference>
1. WSL2 설치
2. Ubuntu 18.04 LTS 설치
3. NVIDIA 드라이버 설치
- NVIDIA 드라이버 공홈 접속 : Official Drivers | NVIDIA)
Download the latest official NVIDIA drivers
Download the latest official NVIDIA drivers
www.nvidia.com
- 현재 스펙이 Windows11/ GTX 1660 Ti 이므로 다음의 스펙으로 다운로드 및 설치
4. CUDA 설치
- 이건 진짜 어떤 레퍼런스를 보던 버전 못 맞춰서 해결 못했는데
- Enabling GPU acceleration on Ubuntu on WSL2 with the NVIDIA CUDA Platform | Ubuntu
Enabling GPU acceleration on Ubuntu on WSL2 with the NVIDIA CUDA Platform | Ubuntu
Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.
ubuntu.com
- 상기 레퍼런스 기준으로 버전 명시 안하고 진행해서 해결했다
5. VS code 에서 코드 작성 + WSL에서 돌리기
- 제대로 도는지 확인하기 위해서 Pytorch에서 제공하는 튜토리얼 코드를 하나 돌려봄 : Quickstart — PyTorch Tutorials 1.12.1+cu102 documentation
- 커맨드 창에서 VS code를 켜기 위해 하기와 같이 치면 VS code가 켜짐
- : 안되면 'VS code 설치 리눅스 커맨드' 쯤으로 쳐서 따라하면 된다
code .
Quickstart — PyTorch Tutorials 1.12.1+cu102 documentation
Note Click here to download the full example code Learn the Basics || Quickstart || Tensors || Datasets & DataLoaders || Transforms || Build Model || Autograd || Optimization || Save & Load Model Quickstart This section runs through the API for common task
pytorch.org
- VS code에 튜토리얼 코드 쳐서 넣고
- python 명령어로 돌려주면 정상적으로 동작
- 중간에 뜬 에러는 torchvision이 제대로 설치가 안된거라 Pillow 다시 설치하고(python 2.7 - Failed building wheel for pillow - Stack Overflow)
- 다시 torchvision 설치해서 잡았음
pip3 install torchvision
'Computer Vision' 카테고리의 다른 글
[에러해결] nll_loss 2d forward kernel: block: [5,0,0], thread: [845,0,0] Assertion `t >= 0 && t < n_classes` failed. (0) | 2022.11.16 |
---|---|
VOCSegmentation DataLoader 버그 (0) | 2022.11.14 |
[Python] .scatter()함수 이해 (0) | 2022.08.18 |
(pred.argmax(1) == y).type(torch.float).sum().item() 해석 (1) | 2022.08.17 |
nn.Module 입력과 forward 함수: Pytorch에서 모델 호출법 (0) | 2022.08.16 |