일반적인 도커 실행이 gpu 연동은
nvidia-docker 실행문이나
docker -gpus all 실행문으로 할 수 있다.
하지만 서버에서 dockerd 로 도커 서버를 만들고
클라이언트에서 gpu를 연동하는 방법은 매우 찾기 어려웠는데,
다음과 같은 방법이 있었다
stackoverflow.com/questions/59652992/pycharm-debugging-using-docker-with-gpus
Pycharm debugging using docker with GPUs
The Goal: To debug a Python application in PyCharm, where I set the interpreter to a custom docker image, using Tensorflow and so requiring a GPU. The problem is that PyCharm's command-building do...
stackoverflow.com
nvidia-docker2 가 깔려 있어야 한다!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
우분투(서버)에서 /etc/docker/daemon.json 파일을 고쳐주는것
이 곳에서 docker 내에서의 연산 자체를 default 로 gpu로 할당하게 만들어준다
From { "runtimes": { "nvidia": { "runtimeArgs": ["gpus=all"] } } }
To { "default-runtime": "nvidia", "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] } } }
로 제이슨 파일 변경.