일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- Python
- Elasticsearch
- Chrome
- 빅데이터
- centos 7.5
- Elk
- 서울시민카드
- GPU
- Kubernetes
- 디렉토리
- Linux
- Audit Log
- audit
- K8S
- CentOS
- C
- yum
- rsyslog
- bash
- 크롬
- 파이썬
- PostgreSQL
- syslog
- JSON
- log
- docker
- Shell
- RHEL
- zabbix
- GNOME
- Today
- Total
Sysops Notepad
[GPU] Centos 7 nvidia driver, CUDA , kubernetes gpu device 설치 본문
nvidia Driver 415.18 install
# yum install kernel-devel kernel-headers gcc make
# lsmod | grep nouveau
# vi /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
# dracut --force
# reboot
lspci | grep VGA
# wget http://download.nvidia.com/XFree86/Linux-x86_64/415.18/NVIDIA-Linux-x86_64-415.18.run
# bash NVIDIA-Linux-x86_64-390.59.run
cuda 10.0 install
# rpm -i cuda-repo-rhel7-10.0.130-1.x86_64.rpm
nvidia-docker2 install
# yum install nvidia-docker2
# docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
# vi /etc/docker/daemon.json
{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
# vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
[Service]
...
Environment="KUBELET_EXTRA_ARGS=--feature-gates=DevicePlugins=true"
systemctl daemon-reload
systemctl restart kubelet
DevicePlugin enable
# kubectl create -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v1.11/nvidia-device-plugin.yml
Running GPU Jobs
# vi testpod.yaml
apiVersion: v1
kind: Pod
metadata:
name: gpu-pod
spec:
containers:
- name: cuda-container
image: nvidia/cuda:9.0-devel
resources:
limits:
nvidia.com/gpu: 2 # requesting 2 GPUs
- name: digits-container
image: nvidia/digits:6.0
resources:
limits:
nvidia.com/gpu: 2 # requesting 2 GPUs
# kubectl apply -f testpod.yaml
# kubectl logs <id>
# pod check
kubectl get pods --all-namespaces
# gpu check
kubectl get nodes "-o=custom-columns=NAME:.metadata.name,GPU:.status.allocatable.nvidia\.com/gpu"
참고 :
https://github.com/NVIDIA/k8s-device-plugin
https://www.server-world.info/en/note?os=CentOS_7&p=nvidia
'업무 > sys' 카테고리의 다른 글
[Linux] iops 측정 방법 (0) | 2019.01.18 |
---|---|
[OS] Hyper-Threading disable or enable (0) | 2018.12.27 |
[Linux] kickstart server install (0) | 2018.11.28 |
GlusterFS을 이용한 파일 공유 및 클러스터링 (0) | 2018.11.27 |
[Linux] 에서 출력되는 systemd 로그 제거하는 방법 (0) | 2018.11.26 |