Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- bash
- 파이썬
- RHEL
- Chrome
- syslog
- Kubernetes
- rsyslog
- Audit Log
- GNOME
- 서울시민카드
- yum
- Elk
- CentOS
- C
- PostgreSQL
- 크롬
- Shell
- 빅데이터
- K8S
- Elasticsearch
- zabbix
- centos 7.5
- audit
- GPU
- log
- Python
- docker
- JSON
- Linux
- 디렉토리
Archives
- Today
- Total
Sysops Notepad
[Linux,linux] Centos Multi GPU 환경에서 특정 GPU만 사용하기 본문
728x90
1. Terminal에서 python code를 실행하는 방법
$ CUDA_VISIBLE_DEVICES=0 python test1.py # Uses GPU 0.
$ CUDA_VISIBLE_DEVICES=1 python test2.py # Uses GPU 1.
$ CUDA_VISIBLE_DEVICES=2,3 python test3.py # Uses GPUs 2 and 3.
or
2. python code 추가하는 방법
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
참고:
https://stackoverflow.com/questions/34775522/tensorflow-multiple-sessions-with-multiple-gpus
https://stackoverflow.com/questions/37893755/tensorflow-set-cuda-visible-devices-within-jupyter
728x90
'업무 > dev' 카테고리의 다른 글
[Python] HTML 파싱 하기 (0) | 2019.03.11 |
---|---|
[python] logging 모듈 사용하기 (0) | 2019.02.26 |
[Python] 파이썬 람다(lambda) 간단한 사용법 (0) | 2019.02.20 |
[Python] 파이썬 *args,**kwargs 의미 (Asterisk(*)) (0) | 2019.02.20 |
[Python] Jupyter 메모리 사용률 확인 (0) | 2019.02.20 |
Comments