주저리주저리

[환경구축] 연구실 컴퓨터 초기 설정

씨주 2024. 7. 1. 15:32

0. ubuntu 설치

BIOS 진입 : F2, F12

 

설치방법

https://dreamgonfly.github.io/blog/install-ubuntu-with-partition/#3-4-efi-%ED%8C%8C%ED%8B%B0%EC%85%98

root 파티션 : 연구실 컴퓨터는 500GB로 설정

 

프리징현상 해결

recovery모드 진입 : esc

sudo apt-get update
sudo apt-get install vim
sudo vim /etc/default/grub

# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

 

sudo vim /etc/modprobe.d/blacklist.conf

# blacklist nouveau
# options nouveau modeset=0

 

sudo update-initramfs -u
sudo update-grub
reboot

 

참고 : https://logforlog.tistory.com/entry/Ubuntu-%EC%9A%B0%EB%B6%84%ED%88%AC-2004-LTS-%ED%99%94%EB%A9%B4-freezing-%EB%AC%B8%EC%A0%9C-%ED%95%B4%EA%B2%B0

 

1. 인터넷 연결

https://justee.tistory.com/2

 

2. 크롬 설치

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

참고 : https://jjeongil.tistory.com/1944

 

3. 한글키 설정

https://mech2cs.tistory.com/entry/Ubuntu-2004-%ED%95%9C%EA%B8%80%EC%9E%85%EB%A0%A5%EA%B8%B0-%EC%84%A4%EC%B9%98

https://kr-ddubbu.tistory.com/8

 

hangul 표시 없애기

https://qspblog.com/blog/%EC%9A%B0%EB%B6%84%ED%88%AC-ubuntu-%ED%95%9C%EA%B8%80-%ED%82%A4%EB%B3%B4%EB%93%9C-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0-fcitx-%ED%8E%B8%EC%A7%91%EA%B8%B0-%EC%84%A4%EC%A0%95

 

4. nvidia

# 현재 환경에 맞는 nvidia driver 추천
sudo ubuntu-drivers devices

# recommende 버전 설치
sudo apt install nvidia-driver-525
reboot
# 설치 확인
nvidia-smi

 

5. python, conda, cuda, pytorch 설치

더보기

GPU : GTX 3060

Ubuntu 20.04
python : 3.8
conda : 최신
cuda : 12.0 (nvidia-smi)
pytorch : 2.3.0

 

conda 설치

https://www.anaconda.com/download/success

# 2024.10-1 수정해서 설치
cd ~/Downloads
sha256sum Anaconda3-2024.10-1-Linux-x86_64.sh
bash Anaconda3-2024.10-1-Linux-x86_64.sh
source ~/.bashrc
# 설치 확인
conda --version

 

cuda 설치

https://developer.nvidia.com/cuda-toolkit-archive

wget https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run
sudo sh cuda_12.0.0_525.60.13_linux.run

 

에러

gcc관련 : https://gooopy.tistory.com/134

nvidia-drm관련 : https://sonseungha.tistory.com/698

 

# 경로 설정
vim ~/.bashrc

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

source ~/.bashrc
# 설치 확인
nvcc -V

 

pytorch 설치

https://pytorch.org/

https://pytorch.org/get-started/previous-versions/

# CUDA 11.8
conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 pytorch-cuda=11.8 -c pytorch -c nvidia
# 설치 확인
python -c "import torch; print(torch.cuda.is_available())"

 

참고 : https://jooona.tistory.com/140

 

6. vscode 설치

https://code.visualstudio.com/

cd Downloads
sudo apt install ./code_1.98.0-1741124782_amd64.deb

 

vscode 연동

docker

python

copilot

dev containers

Remote - SSH

 

7. git 설치

sudo apt install git

 

8. slack 설치

slack : https://stupidly-honest.tistory.com/25

 

9. wine, 카톡 설치

와인설치(카톡 설치 X) : https://tolovefeels.tistory.com/65

카톡설치 : https://itlearningcenter.tistory.com/entry/%E3%80%90Ubuntu-2004-LTS%E3%80%91%EC%B9%B4%EC%B9%B4%EC%98%A4%ED%86%A1-%EC%84%A4%EC%B9%98-1

카톡한글깨짐 : https://menggu1234.tistory.com/15

 

11. Docker 설치

# docker 설치
# 필요 패키치 설치
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
 

# Docker의 공식 GPG키 추가
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 
# Docker의 공식 apt 저장소 추가
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

# Docker 설치
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

# Docker 설치 확인
sudo systemctl status docker
# sudo없이 docker 실행
sudo groupadd docker
sudo usermod -aG docker ${USER}
sudo service docker restart
newgrp docker

# 설정 확인
docker images
# GPG키, 저장소 추가
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/apt/sources.list.d/nvidia-docker.list
   
# nvidia-docker 설치
sudo apt-get update
sudo apt-get install -y nvidia-docker2

# 재시작
sudo systemctl restart docker

# 설정 확인
docker run --rm --gpus all ubuntu:18.04 nvidia-smi

 

참고 : https://haengsin.tistory.com/128

https://data-science-hi.tistory.com/203

 

12. ssh bronken pipe 예방

# vi ~/.ssh/config
Host * 
ServerAliveInterval 120 
TCPKeepAlive no

https://may0301.tistory.com/10

 

13. SSD 마운트

https://aeong-dev.tistory.com/11

 

14. filzilla 설치

sudo apt-get install filezilla

 

15. Anydesk 설치

sudo apt update

# repository 등록
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo apt-key add -
echo "deb http://deb.anydesk.com/ all main" | sudo tee /etc/apt/sources.list.d/anydesk-stable.list

# 설치
sudo apt update
sudo apt install anydesk

 

자동 연결

setting -> security -> unlock -> security -> Enable unattended access -> Set password

 

참고 : https://physical-world.tistory.com/58

 

15. SSH 연결

# openssh-server 설치
sudo apt-get install openssh-server

# 실행 확인
sudo systemctl status ssh

# 시작
sudo systemctl start ssh
# 맥북
ssh-keygen -R [접속 IP]

 

15. 동글 설치

https://lookchang.tistory.com/195

 

16. ROS2 설치

ubuntu 22.04는 foxy 지원 X

https://makingrobot.tistory.com/159

 

재형블로그 : https://faceyourfear.tistory.com/

참고(민수블로그) :  https://velog.io/@setxty/Ubuntu-Setting

영민블로그 : https://psleon.tistory.com/

'주저리주저리' 카테고리의 다른 글

VS Code SSH서버 원격접속 하는 방법  (0) 2024.09.24
NVIDIA GPU 실시간 확인  (0) 2024.09.23