환경구축
-
인터넷에 있는 자료를 다운 받을때환경구축 2023. 3. 19. 02:17
# Download/unzip images and labels d='../datasets' # unzip directory url=https://github.com/ultralytics/yolov5/releases/download/v1.0/ f='coco128.zip' # or 'coco128-segments.zip', 68 MB echo 'Downloading' $url$f ' ...' curl -L $url$f -o $f -# && unzip -q $f -d $d && rm $f & wait # finish background tasks 상당히 좋은 예라서 적어 놓는다. 내가 저장하고 싶은 폴더 = d 받고 싶은 주소 = url curl -L 에서 -L 의미 redirction 의미함. 출처 : ht..
-
환경 구축 category 의 목적....환경구축 2023. 2. 11. 22:32
어쩌다 보니 노트북을 포멧하게되었고... 그래서 내가 환경 구축한 내용의 히스토리를 하나둘씩 적어 보려고한다. 나중에 내가 참조하려는 목적도 있지만 아무것도 모르는 사람이 딥러닝을 배우려고할때 참조가 되었으면 하는 마음으로 적는다. 참고로 환경 셋팅은 코드 실력만큼이나 중요한것 같다. 예로 파이썬을 그냥할 수도 있고 virtualenv 를 해서 가상 환경을 만들어서 할 수도 있고 conda 로 할수도 있다. 그리고 docker를 통해서 할 수도 있다. 난 전문가가 아니지만 나보다 더 모르는 사람을 위해서 내 경우는 초보자도 쉽게 할 수 있는 방식과 중요하다고 생각되어지는 부분을 적어 놓으려고 한다.
-
conda 설치환경구축 2023. 2. 11. 22:27
이 쉬운것을 적어야하나 하는 생각도 들지만 환경 구축이라는 category에 내가 뭘 설치했는지 적어 놨으면 해서 적는다. https://conda.io/projects/conda/en/latest/user-guide/install/linux.html Installing on Linux — conda 23.1.0.post32+239ce89fb documentation © Copyright 2017, Anaconda, Inc. Revision 239ce89f. conda.io 여기 사이트가서 파일을 다운 받은 후 bash Anaconda-latest-Linux-x86_64.sh 해당 명령어를 치면 설치가 될것이다. 설치가 제대로 되었다면 cat ~/.bashrc치면 아래와 같은 코드를 발견 할 수 있을것이..
-
nvidia-driver, cuda-driver,pytorch 설치환경구축 2023. 2. 11. 22:16
pytorch에서 cuda를 사용하려고하면 설치를 하지 않으면 에러가 난다. 우선 아래 명령어를쳐보자! python >>> import torch >>> print(torch.cuda.is_available()) 설치가 제대로 되지 않았다면 리눅스 설치하고 아래 코드를 쳐보면 False가 되었다면 아래 방법으로 설치를 해보자! 검색해보면 여러 방법이 있지만 난 이방법이 최고 좋은 것 같다. 우선 이해가 되어야 설치시 헷갈림을 방지할 수 있다. pytorch에서 cuda를 사용하기 위해서 3개를 설치해야한다. 그리고 순서는 아래와 같다. nvidia driver --> cuda driver --> pytorch 설치 맨 번저 해야할 것은 nvidia driver 이다. 공식 사이트 가면 자동으로 detec..
-
GIT 자주 사용하는 명령어환경구축 2023. 2. 7. 00:40
git을 사용하다보면 사실 몇개 쓰지 않는다. 당연히 문제가 생기면 많은 명령어를 사용하지만 여기 적힌것만 알면 되는것 같기는하다. 1. git clone 예 git clone https://github.com/autonomousvision/transfuser.git - 저장소 받을때 사용함. 2. git pull - 최신 코드를 가져와서 merge함. 그러나 이 경우 잘못하면 conflict 날 수 있음. 이럴때는 아래 처럼 하면됨. 3. git checkout -B master origin/master git checkout -B origin/ 이렇게 하면 remote에 있는 branch를 가져와서 overwrite함. 4. git reflog - 내가 사용한 명령어로 되돌아가고 싶을때 사용. - g..
-
GIT 환경구축환경구축 2023. 2. 6. 23:58
S/W를 처음 사용하면 GIT을 요즘 알지 못하면 할 수 있는것 이 없다. 우선 github에서 코드도 다운 받아야하고 이것저것 해야하기 때문이다. 내가 자주 사용하고 알아두면 좋은 기능만 적어두려고 한다. 요즘은 그냥 git 환경 구축은 하나로 통일 된것 같다. visual studio code를 설치하고 git을 설치하는 것이다. 여러가지 gui 툴이 있지만 terminal을 알아야 리눅스 윈도우 여러 군데서 사용가능하므로 터미널기준으로 작성하려고한다. 1. visual studio code 를 설치한다. 2. 아래 gitlens 와 git graph를 설치한다. - GitLens를 설치하는 이유는 conflict 났을때 해당 add on이 있으면 해결하기 쉽다. - Git Graph는 gui로 보기..