우분투 파티션하고 마운트하기
파티션(Partition)이란 하드디스크의 영역을 설정하는 것을 말한다.
파티션 장치명은 /dev/sda1 처럼 구성되는데
여기서 sd는 S-ATA 및 SCSI 방식 디스크, SSID, USB 등을 의미
hd는 IDE방식의 디스크를 의미
a는 디스크의 우선순위를 의미한다.
1은 파티션 번호를 의미한다.
swap : RAM이 부족할 경우 사용되는 영역으로
파티션 분할을 하기 위해서 여러가지 툴을 쓸 수 있는데 fdisk, parted, cfdisk, sfdisk, kpartx 등이 가능하다.
fdisk -l

저는 /dev/sdb를 포맷하고 싶기 때문에
fdisk /dev/sdb 명령어를 사용하겠습니다.
파티션을 지욱고 싶어서
fdisk /dev/sdb
1, 2, 3을 지웠습니다.
d>1>w
p>w
mkfs.ext4 /dev/sdb1
blkid
vi /etc/fstab
sudo mount -a
'ubuntu' 카테고리의 다른 글
리눅스 계정 비밀번호 초기화 (0) | 2020.12.06 |
---|---|
ssh 등록하기 (0) | 2020.11.12 |
ubuntu 20.04 세팅하기[gpu 분석 세팅, jupyter notebook] (0) | 2020.11.12 |
ubuntu LightGBM install (0) | 2020.04.14 |
라즈베리파이 selenium 사용법 (0) | 2020.03.23 |
sudo apt-get install openssh-server
sudo apt-get install ssh
sudo vi /etc/ssh/sshd_config
sudo ufw enable
sudo ufw allow 22

'ubuntu' 카테고리의 다른 글
리눅스 계정 비밀번호 초기화 (0) | 2020.12.06 |
---|---|
우분투 파티션하고 마운트하기 (0) | 2020.11.14 |
ubuntu 20.04 세팅하기[gpu 분석 세팅, jupyter notebook] (0) | 2020.11.12 |
ubuntu LightGBM install (0) | 2020.04.14 |
라즈베리파이 selenium 사용법 (0) | 2020.03.23 |
ubuntu 20.04 세팅하기[gpu 분석 세팅, jupyter notebook]
우분투에 tensorflow 와 pytorch를 설치해보자.
아래 명령어를 통해 nvidia의 잔여 찌꺼기를 모두 제거하자.
sudo apt-get --purge remove nvidia*
아래 명령어를 통해 내게 맞는 드라이버 목록을 확인하자.
ubuntu-drivers devices

위에서 처럼 recommended 로 추천이라고 적혀있다.
명령어로 다운받기 위해 다운받을 리퍼지토리를 등록하자.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
아래 명령어를 통해 설치 가능한 드라이버 목록을 확인 할 수 있다.
apt-cache search nvidia | grep nvidia-driver-450
sudo apt-get install nvidia-driver-450
설치가 완료되면 재부팅하자.
sudo reboot
만약 설치 중 문제가 발생하면 아래 명령어를 사용합시다.
sudo apt --purge autoremove nvidia*
아래 명령어로 자동 인스톨 또한 가능합니다.
ubuntu-drivers autoinstall
아나콘다를 설치하자.
www.anaconda.com/distribution/
"cd /설치된 경로" 명령어로 경로를 이동한 뒤 다음 명령어를 실행하자.
sudo bash Anaconda3-2020.07-Linux-x86_64.sh

엔터 치라고 하니 Enter

라이센스에 동의합니까는 yes가 국룰

아나콘다 경로는 디폴트로 하겠습니다.

아나콘다 명령어가 터미널 아무데서나 실행되게 하겠느냐 라는 명령어 입니다. yes
conda create --name kerasGPU keras-gpu python=3.6
conda create -n tf1_14 tensorflow-gpu=1.14 keras-gpu python=3.6
conda create --name [새로운 가상환경이름] --clone [복제하려는 가상환경이름]
conda install pytorch torchvision torchaudio cudatoolkit=10.1 -c pytorch
pytorch.org/홈페이지에서 맞는 환경의 명령어를 받으세요.!
PyTorch
An open source deep learning platform that provides a seamless path from research prototyping to production deployment.
pytorch.org
tensorflow gpu check
import tensorflow as tf
tf.test.is_gpu_available()
import torch
torch.cuda.is_available()
torch.cuda.current_device()
torch.cuda.get_device_name(0)
conda install catboost
conda install -c conda-forge lightgbm
ligth GBM gpu 버전 설치
github.com/microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version
microsoft/LightGBM
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning ...
github.com
병렬처리를 하려면 cmake 가 필요한거 같다.
아래명령어는 cmake설치 명령어인데 아래로 설치하면 애러가 뜨는 것 같다.
sudo apt install cmake
https://cmake.org/downlaod홈페이지에서 다운로드를 받고 압축 풀기 및 설치를 해보자.
tar -xvzf 해당파일.tar.gz
cd 해당파일
./bootstrap --prefix=/usr/local
에러뜨면 아래 명령어
apt-get install libssl-dev
make
make install
vi ~/.bashrc
PATH=$PATH:/usr/local/bin/
source ~/.bashrc
cmake --version
사이트를 보면 이외에도 필요한 것들이 있는데
OpenCL, libboost를 설치해 달라고 나온다.
sudo apt-get install ocl-icd-libopencl1 ocl-icd-opencl-dev libboost-dev libboost-system-dev libbost-filesystem-dev
를 설치해준다.
설치가 끝났다면
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build; cd build
cmake -DUSE_GPU=1 ..
make -j4
git clone --recursive https://github.com/microsoft/LightGBM.git
cd LightGBM/python-package
python setup.py install
해당명령어로 설치해주면 된다.
conda install -c anaconda mxnet-gpu
conda install scikits.cuda
xgboost gpu 설치
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
make -j4
eagle705.github.io/articles/2018-06/XGBoost-%EC%A0%95%EB%A6%AC
XGBoost 정리 | eagle705's Note
요즘 Kaggle에서 가장 핫하다는
eagle705.github.io
conda install jupyter notebook
conda install -c conda-forge jupyterlab
python
from notebook.auth import passwd
passwd()
'sha1:...............'을 출력할 텐데 저장 해두고 조금있다 입력.
jupyter notebook --generate-config
내부ip 확인하기
sudo apt install net-tools
ifconfig
2번째 줄 inet 옆에 값
주피터 노트북 설정하기
vi ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip = '내부ip'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:...............'
c.NotebookApp.port=8888
c.NotebookApp.notebook_dir=u'/home/ducj/data'
c=get_config()
주피터 노트북 서버 항상 켜진상태로 두기
sudo jupyter notebook --allow-root
ctrl+z
bg
disown -h
sudo ufw allow 8686
주피터 노트북 목록보기
sudo jupyter notebook list
주피터노트북 끄기
sudo jupyter notebook stop 8686
gpu 상태 체크
watch -n 5 nvidia-smi -a --display=utilization
'ubuntu' 카테고리의 다른 글
우분투 파티션하고 마운트하기 (0) | 2020.11.14 |
---|---|
ssh 등록하기 (0) | 2020.11.12 |
ubuntu LightGBM install (0) | 2020.04.14 |
라즈베리파이 selenium 사용법 (0) | 2020.03.23 |
nas 마운트하기 (0) | 2020.03.23 |
ubuntu LightGBM install
https://github.com/microsoft/LightGBM/tree/master/R-package
microsoft/LightGBM
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning ...
github.com
sudo apt install cmake
devtools::install_github("Laurae2/lgbdl")
아래 코드로 설치관련 패키지를 설치한다.
위는 gpu 버전을 필요로할 때
lgb.dl(commit = "master", compiler = "vs", # Remove this for MinGW + GPU installation repo = "https://github.com/microsoft/LightGBM", use_gpu = TRUE)
아래는 cpu버전을 활용할 때 사용하면 된다.
lgb.dl(commit = "master", compiler = "vs", repo = "https://github.com/microsoft/LightGBM")
'ubuntu' 카테고리의 다른 글
ssh 등록하기 (0) | 2020.11.12 |
---|---|
ubuntu 20.04 세팅하기[gpu 분석 세팅, jupyter notebook] (0) | 2020.11.12 |
라즈베리파이 selenium 사용법 (0) | 2020.03.23 |
nas 마운트하기 (0) | 2020.03.23 |
라즈베리파이 openCV 설치 및 관절 인식 (2) | 2020.02.13 |
보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.