IBM Docker 이미지¶
로컬 설치를 단순화하기 위해, Driverless AI가 다음 시스템 조합에 대한 Docker 이미지로 제공됩니다:
호스트 OS |
Docker 버전 |
호스트 아키텍처 |
Min 메모리 |
---|---|---|---|
RHEL 또는 CentOS 7.4 이상 |
Docker CE |
ppc64le |
64GB |
Notes:
CUDA 10 이상(NVIDIA 드라이버 440.82이상) (GPU만 해당)
Power에서 GPU용 LightGBM을 사용하려면 enable_lightgbm_cuda_support 상세 설정을 활성화하십시오. LightGBM OpenCL 은 현재 Power에서 지원되지 않습니다.
GPU 지원을 포함하여 최고의 성능을 얻으려면 nvidia-docker를 사용하십시오. GPU를 포함하지 않는, 저성능 환경의 경우 일반 docker2(동일한 docker 이미지 사용)를 사용하십시오.
이 설치 단계에서는 귀하에게 Driverless AI에 대한 라이선스 키가 있다고 가정합니다. Driverless AI의 라이선스 키 획득에 대한 자세한 내용은 https://www.h2o.ai/products/h2o-driverless-ai/에서 확인하십시오. 일단 라이선스 키를 획득한 후에는 최초 로그인 시 라이선스 키를 Driverless AI UI에 붙여넣으라는 메시지가 나타나거나 아니면 .sig 파일로 저장하고 설치 프로세스 중에 만들게 되는 license 폴더에 저장할 수도 있습니다.
GPU를 포함한 IBM에 설치¶
본 섹션에서는 GPU를 포함한 IBM Power LE 시스템용 RHEL에서 Driverless AI Docker 이미지의 설치 및 시작 방법에 대해 설명합니다. nvidia-docker는 ppc64le 시스템을 제한적으로 지원합니다. ppc64le 머신에 대한 nvidia-docker 지원에 대한 자세한 정보는`here <https://github.com/nvidia/nvidia-docker/wiki/Frequently-Asked-Questions#do-you-support-powerpc64-ppc64le>`__ 에서 확인하십시오.
터미널을 열고 Driverless AI를 실행할 시스템에 ssh를 적용합니다. 로그인한 다음, 다음 단계를 수행합니다.
https://www.h2o.ai/download/에서 Driverless AI Docker 이미지를 검색합니다.
/Etc/yum.repos.d/
의cuda-rhel7.repo
에 다음을 추가하십시오.
[cuda] name=cuda baseurl=http://developer.download.nvidia.com/compute/cuda/repos/rhel7/ppc64le enabled=1 gpgcheck=1 gpgkey=http://developer.download.nvidia.com/compute/cuda/repos/rhel7/ppc64le/7fa2af80.pub
/Etc/yum.repos.d/
의nvidia-container-runtime.repo
에 다음을 추가하십시오.
[libnvidia-container] name=libnvidia-container baseurl=https://nvidia.github.io/libnvidia-container/centos7/$basearch repo_gpgcheck=1 gpgcheck=0 enabled=1 gpgkey=https://nvidia.github.io/libnvidia-container/gpgkey sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt [nvidia-container-runtime] name=nvidia-container-runtime baseurl=https://nvidia.github.io/nvidia-container-runtime/centos7/$basearch repo_gpgcheck=1 gpgcheck=0 enabled=1 gpgkey=https://nvidia.github.io/nvidia-container-runtime/gpgkey sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
최신 드라이버 및 최신 버전의 CUDA를 설치합니다.
yum -y install nvidia-driver-latest-dkms cuda --nogpgcheck
RedHat에 Docker를 설치합니다.
yum -y install docker
NVIDIA 후크를 설치합니다(자세한 내용은 https://github.com/NVIDIA/nvidia-docker#rhel-docker를 참조하십시오). 이를 통해, Docker의 런타임이
nvidia-runtime
으로 자동 전환됩니다.
yum -y install nvidia-container-runtime-hook
호스트 시스템에서 Driverless AI 버전에 대한 디렉터리를 설정합니다.
# Set up directory with the version name mkdir dai-1.9.2.1
디렉터리를 새 폴더로 변경한 다음, Driverless AI Docker 이미지를 새 디렉터리로 로드합니다.
# cd into the new directory cd dai-1.9.2.1 # Load the Driverless AI docker image docker load < dai-docker-centos7-ppc64le-1.9.2-10.0.tar.gz
GPU의 지속성을 활성화합니다. 이는 재부팅할 때마다 한 번씩 실행해야 합니다. 자세한 내용은 다음 링크를 참조하십시오: http://docs.nvidia.com/deploy/driver-persistence/index.html.
sudo nvidia-smi -pm 1
호스트 시스템(새 디렉터리 내)에 데이터, 로그, 라이선스 디렉터리를 설정합니다.
# Set up the data, log, license, and tmp directories on the host machine mkdir data mkdir log mkdir license mkdir tmp
이 때 데이터를 호스트 시스템의 데이터 디렉터리로 복사할 수 있습니다. 해당 데이터는 Docker 컨테이너 내에 표시됩니다.
docker 이미지
를 실행하여 이미지 태그를 찾습니다.Driverless AI Docker 이미지를 시작하여, 아래의 TAG를 이미지 태그로 교체합니다. 설치 버전에 따라
docker run --runtime=nvidia
(Docker 19.03 이후) 또는nvidia-docker
(Docker 19.03 이전) 명령을 사용하십시오.
Note: ``docker version``을 사용하여 무슨 버전의 Docker를 사용하고 있는지 확인합니다.
# Start the Driverless AI Docker image docker run --runtime=nvidia \ --pid=host \ --init \ --rm \ --shm-size=256m \ -u `id -u`:`id -g` \ -p 12345:12345 \ -v `pwd`/data:/data \ -v `pwd`/log:/log \ -v `pwd`/license:/license \ -v `pwd`/tmp:/tmp \ h2oai/dai-centos7-x86_64:TAG# Start the Driverless AI Docker image nvidia-docker run \ --pid=host \ --init \ --rm \ --shm-size=256m \ -u `id -u`:`id -g` \ -p 12345:12345 \ -v `pwd`/data:/data \ -v `pwd`/log:/log \ -v `pwd`/license:/license \ -v `pwd`/tmp:/tmp \ h2oai/dai-centos7-x86_64:TAGDriverless AI가 실행됩니다:
-------------------------------- Welcome to H2O.ai's Driverless AI --------------------------------- - Put data in the volume mounted at /data - Logs are written to the volume mounted at /log/20180606-044258 - Connect to Driverless AI on port 12345 inside the container - Connect to Jupyter notebook on port 8888 inside the container
http://Your-Driverless-AI-Host-Machine:12345에서 브라우저로 Driverless AI에 연결합니다.
CPU를 포함한 IBM에 설치¶
본 섹션에서는 CPU를 포함한 IBM Power LE 시스템용 RHEL에서 Driverless AI Docker 이미지의 설치 및 시작 방법에 관해 설명합니다. 이것은 nvidia-docker
가 아닌 docker
를 사용합니다. GPU 지원을 사용할 수 없습니다.
Watch the installation video here. 이 비디오의 일부 이미지가 릴리스 사이에 변경될 수도 있지만, 설치 단계는 동일합니다.
Note: 이 글을 쓰는 시점에서 Driverless AI는 RHEL 버전 7.4에서만 테스트되었습니다.
터미널을 열고 Driverless AI를 실행할 시스템에 ssh를 적용합니다. 로그인한 다음, 다음 단계를 수행합니다.
Docker CE 설치 및 시작.
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum makecache fast sudo yum -y install docker-ce sudo systemctl start docker
Docker CE를 실행하는 머신에서 https://www.h2o.ai/driverless-ai-download/에서 Driverless AI Docker 이미지를 검색하십시오.
호스트 시스템에서 Driverless AI 버전에 대한 디렉터리를 설정합니다.
# Set up directory with the version name mkdir dai-1.9.2.1
새 디렉터리 내에 Driverless AI Docker 이미지를 로드합니다.
# Load the Driverless AI Docker image docker load < dai-docker-centos7-ppc64le-1.9.2-10.0.tar.gz
(새 디렉터리 내에) 데이터, 로그, 라이선스, tmp 디렉터리를 설정합니다:
# cd into the directory associated with your version of Driverless AI cd dai-1.9.2.1 # Set up the data, log, license, and tmp directories on the host machine mkdir data mkdir log mkdir license mkdir tmp
데이터를 호스트의 data 디렉터리로 복사합니다. 해당 데이터는 /<user-home>/data 의 Docker 컨테이너 내에 표시됩니다.
docker 이미지
를 실행하여 이미지 태그를 찾습니다.Driverless AI Docker 이미지를 시작합니다. GPU 지원은 사용할 수 없습니다.
$ docker run \ --pid=host \ --init \ --rm \ -u `id -u`:`id -g` \ -p 12345:12345 \ -v `pwd`/data:/data \ -v `pwd`/log:/log \ -v `pwd`/license:/license \ -v `pwd`/tmp:/tmp \ -v /etc/passwd:/etc/passwd:ro \ -v /etc/group:/etc/group:ro \ h2oai/dai-centos7-x86_64:1.9.2.1-cuda10.0.xxDriverless AI가 실행됩니다:
-------------------------------- Welcome to H2O.ai's Driverless AI --------------------------------- - Put data in the volume mounted at /data - Logs are written to the volume mounted at /log/20180606-044258 - Connect to Driverless AI on port 12345 inside the container - Connect to Jupyter notebook on port 8888 inside the container
http://Your-Driverless-AI-Host-Machine:12345에서 브라우저로 Driverless AI에 연결합니다.
Docker Image 중지¶
Driverless AI Docker 이미지를 중지하려면, Driverless AI Docker 이미지를 실행하는 터미널(Mac OS X) 또는 PowerShell(Windows 10) 창에 Ctrl + C 를 입력합니다.
Docker Image 업그레이드¶
이 섹션에서는 Docker 컨테이너에 설치된 Driverless AI 버전의 업그레이드에 관한 지침을 제공합니다. 이 단계는 기존 실험이 저장되도록 합니다.
WARNING: Driverless AI tmp 디렉터리에는 Experiment, MLI, MOJO가 있으며, 이는 Driverless AI가 업그레이드될 때 자동으로 업그레이드되지 않습니다.
업그레이드하기 전에 MLI 모델을 빌드하십시오.
업그레이드하기 전에 MOJO 파이프라인을 빌드하십시오.
업그레이드하기 전에 Driverless AI를 중지하고 Driverless AI tmp 디렉터리를 백업하십시오.
Driverless AI의 업그레이드 전에 모델에 MLI를 빌드하지 않은 경우, 업그레이드 후 해당 모델에서 MLI를 확인할 수 없습니다. 업그레이드 전에 향후 릴리스에서 지속적으로 해석하고자 하는 모형에 MLI 작업을 실행하십시오. 해당 MLI 작업이 현재 버전의 해석 모형 목록에 나타나면, 이는 업그레이드 후에도 유지됩니다.
Driverless AI의 업그레이드 전에 모델에 MOJO 파이프라인을 빌드하지 않은 경우, 업그레이드 후에는 해당 모델에 MOJO 파이프라인을 빌드하지 못합니다. 업그레이드 전에 필요한 모든 모델에서 MOJO 파이프라인을 빌드한 후, Driverless AI tmp 디렉터리를 백업하십시오.
Note: Driverless AI가 계속 실행 중인 경우 중지하십시오.
요구 사항¶
1.7.0 버전부터는 CUDA 9가 지원되지 않습니다. 호스트 환경에 NVIDIA 드라이버 >= 440.82와 함께 CUDA 10.0 버전 이상이 설치되어 있어야 합니다(GPU만 해당). Driverless AI에 자체 CUDA 라이브러리는 제공되지만, 드라이버가 호스트 환경에 있어야 합니다. 최신 NVIDIA Tesla V/P/K 시리즈 드라이버를 다운로드하려면, https://www.nvidia.com/Download/index.aspx를 방문하십시오.
업그레이드 단계¶
Driverless AI를 실행하는 시스템의 IP 주소에 SSH를 사용합니다.
호스트 시스템에서 Driverless AI 버전에 대한 디렉터리를 설정합니다.
# Set up directory with the version name mkdir dai-1.9.2.1 # cd into the new directory cd dai-1.9.2.1
https://www.h2o.ai/download/에서 Driverless AI 패키지를 검색하여 이를 새 디렉터리에 추가합니다.
새 디렉터리 내에 Driverless AI Docker 이미지를 로드합니다.
# Load the Driverless AI docker image docker load < dai-docker-centos7-x86_64-1.9.2-10.0.tar.gz
이전 Driverless AI 디렉터리의 데이터, 로그, 라이선스, tmp 디렉터리를 새 Driverless AI 디렉터리로 복사합니다.
# Copy the data, log, license, and tmp directories on the host machine cp -a dai_rel_1.4.2/data dai-1.9.2.1/data cp -a dai_rel_1.4.2/log dai-1.9.2.1/log cp -a dai_rel_1.4.2/license dai-1.9.2.1/license cp -a dai_rel_1.4.2/tmp dai-1.9.2.1/tmp
이 때 이전 버전의 실험이 Docker 컨테이너 내에 표시됩니다.
docker image
를 사용하여 새 이미지 태그를 찾습니다.Driverless AI Docker 이미지를 시작합니다.
http://Your-Driverless-AI-Host-Machine:12345에서 브라우저로 Driverless AI에 연결합니다.