본문 바로가기

Computer Vision

[환경 구축] Windows11 / WSL2 / NVIDIA GeForce GTX 1660 Ti / Pytorch / VS code 환경에서 딥러닝 개발하기

환경에 계속 실패하다가 겨우 성공해서 백업용으로 쓴다.

 

<진행 순서>

1. WSL2 설치

2. Ubuntu 18.04 LTS 설치 

3. NVIDIA 드라이버 설치

4. CUDA 설치

5. VS code 에서 코드 작성 + WSL에서 돌리기 


<현재 GPU 스펙 >

- NVIDIA GeForce GTX 1660 Ti

GPU 스펙 : GT

 

<설치 Reference>

1. WSL2 설치

2. Ubuntu 18.04 LTS 설치 

3. 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

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 명령어로 돌려주면 정상적으로 동작 

pip3 install torchvision

 

728x90