컨테이너6 [딥러닝 서버 A to Z] 도커(Docker) 컨테이너 설정 - 5. Tmux로 세션 관리하기 딥러닝 학습은 시간을 많이 소요하기 때문에 로컬 PC가 꺼져도 세션은 계속 작동되어야 함. 1. Tmux 설치apt-get install tmux 2. Tmux 실행tmux 3. 새로운 세션 실행tmux new -s [SESSION NAME] 4. 세션 중 나가기(종료 아님) / 종료는 세션 내에서 exitCtrl + b 누른 뒤, d 누르기 5. 실행 중인 세션 확인하기tmux ls 6. 세션 다시 연결하기 tmux attach-session -t [SESSION NAME] 2025. 1. 22. [딥러닝 서버 A to Z] 도커(Docker) 컨테이너 설정 - 4. 컨테이너 리소스 제한 Container는 무제한으로 HOST의 리소스를 사용하기 때문에, 각 컨테이너마다 리소스 제한이 필요할 때가 있음 1. Container CPU 사용 수 제한 (host에 CPU가 여러 개 있는 경우)docker run -itd --name [컨테이너이름] --hostname [생성할 호스트이름] --gpus '"device=0,1,2"' --cpuset-cpus=”0,1” nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 2. Container CPU 사용량 제한 (기준 사용량 1(1024)을 기준으로 2024는 기본값보다 2배 사용한다)docker run -itd --name [컨테이너이름] --hostname [생성할 호스트이름] --gpus '"device=0,1,2.. 2025. 1. 22. [딥러닝 서버 A to Z] 도커(Docker) 컨테이너 설정 - 3. Image / Container 구축 도커에서 컨테이너를 구축하기 전에 먼저 Image를 생성해야합니다. 삭제 방법도 아래에 적어드리겠습니다. 1. 도커 Image1. Image 생성 (Repository 참고자료: https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/supported-tags.md)예시 : CUDA 12.1.1 / CUDNN8.9.4 (cudnn8 = 8 내에서의 lastest로 맞춰주는 듯) / UBUNTU 22.04docker pull nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 2. 설치된 Docker images 확인docker images 3. 설치된 image 삭제 (호스트의 용량 관리를 위해)docker rmi [i.. 2025. 1. 22. [딥러닝 서버 A to Z] 도커(Docker) 컨테이너 설정 - 2. NVIDIA-Docker Container에서 GPU를 사용하기 위해서는 NVIDIA Docker를 설치해야 합니다. 1. NVIDIA-Docker 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 2. NVIDIA-Docker 설치sudo apt-get upd.. 2025. 1. 22. [딥러닝 서버 A to Z] 도커(Docker) 컨테이너 설정 - 1. 설치하기 (Ubuntu) 1. apt updatesudo apt-get update 2. Docker 설치를 위한 패키지 설치sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common 3. Docker GPG 키 추가curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 4. Docker apt 저장소 추가sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"sudo apt-get upda.. 2025. 1. 22. [딥러닝 서버 A to Z] 도커(Docker) 컨테이너 설정 - 1. 설치하기 (CentOS/RHEL) 1. yum-utils 설치yum install -y yum-utils2. Docker Repository 다운받기yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repoyum install docker-ce docker-ce-cli containerd.io docker-compose-plugin**에러발생?아래 두 명령어 실행 후, 처음부터 명령어 수행yum erase podman buildahyum remove runc 3. Docker 설치 확인yum list installed | grep docker 4. Docker 실행systemctl start docker 5. Docker Root Directo.. 2025. 1. 22. 이전 1 다음