2020년 6월 15일 월요일

RHEL 7.6, WML-CE 1.6.2 설치하기 (ppc64le, AC922 서버)

IBM 에서는 Watson Machine Learning Community Edition(WML-CE, 구 PowerAI)를 무료로 사용할 수 있게끔 배포하고 있습니다. 구 버전의 PowerAI를 설치하려면 rpm, deb 패키지를 다운로드 받아야 했으나, WML-CE로 변경 후에는 Anaconda installer를 다운로드 받아서 손쉽게 설치할 수 있도록 변경되었습니다.

WML-CE의 설치 과정은 아래 링크에서 소개하고 있습니다.
https://www.ibm.com/support/knowledgecenter/en/SS5SF7_1.6.2/navigation/wmlce_systemsetup.html

아래에서는 RHEL 7.6 버전의 OS 환경(ppc64le, AC922, POWER9)에서 WML-CE 1.6.2 를 설치하는 과정을 소개합니다.

[root@p1311-met1 ~]# yum -y install wget nano bzip2
[root@p1311-met1 ~]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

[root@p1311-met1 ~]# rpm -ihv epel-release-latest-7.noarch.rpm
[root@p1311-met1 ~]# yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
[root@p1311-met1 ~]# yum update kernel-tools kernel-tools-libs kernel-bootwrapper

[root@p1311-met1 ~]# cp /lib/udev/rules.d/40-redhat.rules /etc/udev/rules.d/
[root@p1311-met1 ~]# vi /etc/udev/rules.d/40-redhat.rules
# Memory hotadd request
#SUBSYSTEM!="memory", ACTION!="add", GOTO="memory_hotplug_end"
#PROGRAM="/bin/uname -p", RESULT=="s390*", GOTO="memory_hotplug_end"

#ENV{.state}="online"
#PROGRAM="/bin/systemd-detect-virt", RESULT=="none", ENV{.state}="online_movable"
#ATTR{state}=="offline", ATTR{state}="$env{.state}"

#LABEL="memory_hotplug_end"

이전에 설치된 nvidia driver 가 있는지 확인합니다. 만약 목록에 나오면, 삭제합니다.
[root@p1311-met1 ~]# rpm -qa | egrep 'cuda.*(9-2|10-0)'
[root@p1311-met1 ~]# rpm -qa | egrep '(cuda|nvidia).*(396|410)\.'
[root@p1311-met1 ~]# rpm -qa | egrep '(cuda|nvidia).*repo'

NVIDIA 공식 사이트에서 gpu driver 를 다운로드 받고, 서버에 올려둡니다. (https://www.nvidia.com/Download/index.aspx)

저는 ppc64le용 418.216.02 driver 버전으로 다운로드 받았습니다. chmod 명령어로 파일에 실행권한을 주고, .run 파일을 실행시킵니다.
만약 시스템에 cc, gcc 가 설치되어 있지 않거나, PATH에서 찾을 수 없으면 정상적으로 설치가 되지 않습니다. (yum install gcc)

[root@p1311-met1 ~]# ls -al
total 37304
dr-xr-x---  6 root root     4096 Jun 15 00:12 .
dr-xr-xr-x 21 root root     4096 Jun 12 03:16 ..
-rw-r--r--  1 root root       18 Dec 28  2013 .bash_logout
-rw-r--r--  1 root root      176 Dec 28  2013 .bash_profile
-rw-r--r--  1 root root      176 Dec 28  2013 .bashrc
-rw-r--r--  1 root root      100 Dec 28  2013 .cshrc
-rw-r--r--  1 root root    15264 Sep 18  2019 epel-release-latest-7.noarch.rpm
-rw-rw-r--  1 root root 38137801 Jun 15 00:10 NVIDIA-Linux-ppc64le-418.126.02.run
drwxr-----  3 root root     4096 Jun 14 23:59 .pki
drwxr-xr-x  2 root root     4096 Feb 25  2019 .rpmdb
drwx------  2 root root     4096 Jun 12 03:16 .ssh
drwxr-xr-x  2 root root     4096 Jun 14 03:36 support-scripts
-rw-r--r--  1 root root      129 Dec 28  2013 .tcshrc
[root@p1311-met1 ~]# chmod +x NVIDIA-Linux-ppc64le-418.126.02.run
[root@p1311-met1 ~]# ./NVIDIA-Linux-ppc64le-418.126.02.run
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-ppc64le 418.126.02.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................




nvidia driver 설치가 완료되면, nvidia-smi 명령어로 gpu 의 상태를 확인할 수 있습니다.

[root@p1311-met1 ~]# nvidia-smi
Mon Jun 15 00:23:02 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.126.02   Driver Version: 418.126.02   CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla V100-SXM2...  Off  | 00000004:04:00.0 Off |                    0 |
| N/A   32C    P0    54W / 300W |      0MiB / 32480MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  Tesla V100-SXM2...  Off  | 00000004:05:00.0 Off |                    0 |
| N/A   35C    P0    55W / 300W |      0MiB / 32480MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   2  Tesla V100-SXM2...  Off  | 00000035:03:00.0 Off |                    0 |
| N/A   27C    P0    52W / 300W |      0MiB / 32480MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   3  Tesla V100-SXM2...  Off  | 00000035:04:00.0 Off |                    0 |
| N/A   29C    P0    54W / 300W |      0MiB / 32480MiB |      3%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

시스템을 재시작합니다.
[root@p1311-met1 ~]# shutdown -r now

이후 WML-CE 를 설치하기 전에, 필요 시 Mellanox driver를 우선 설치합니다. Infiniband 등의 구성이 필요한 경우에 필요하며, Infiniband 구성이 없는 경우 아래 단계는 skip 하셔도 됩니다.

다운로드 사이트에 가면, Current versions (가장 최신) 및 Archive Versions 각 탭에서 원하는 OS distribution에 맞추어 상세 버전, 아키텍처에 적합한 드라이버를 다운로드 받을 수 있습니다.

[root@p1311-met1 ~]# ls -al
total 579612
dr-xr-x---  6 root root      4096 Jun 15 00:40 .
dr-xr-xr-x 21 root root      4096 Jun 15 00:28 ..
-rw-------  1 root root      1636 Jun 15 00:25 .bash_history
-rw-r--r--  1 root root        18 Dec 28  2013 .bash_logout
-rw-r--r--  1 root root       176 Dec 28  2013 .bash_profile
-rw-r--r--  1 root root       176 Dec 28  2013 .bashrc
-rw-r--r--  1 root root       100 Dec 28  2013 .cshrc
-rw-r--r--  1 root root     15264 Sep 18  2019 epel-release-latest-7.noarch.rpm
-rw-r--r--  1 root root 236506898 Jun 15 00:41 MLNX_OFED_LINUX-4.5-1.0.1.0-rhel7.6alternate-ppc64le.tgz
-rw-r--r--  1 root root 318803553 Jun 15 00:41 MLNX_OFED_LINUX-5.0-2.1.8.0-rhel7.6alternate-ppc64le.tgz
-rwxrwxr-x  1 root root  38137801 Jun 15 00:10 NVIDIA-Linux-ppc64le-418.126.02.run
drwxr-----  3 root root      4096 Jun 14 23:59 .pki
drwxr-xr-x  2 root root      4096 Feb 25  2019 .rpmdb
drwx------  2 root root      4096 Jun 12 03:16 .ssh
drwxr-xr-x  2 root root      4096 Jun 15 00:29 support-scripts
-rw-r--r--  1 root root       129 Dec 28  2013 .tcshrc

Mellanox driver 설치 전에, 아래 패키지를 설치해줍니다.
[root@p1311-met1 ~]# yum install lsof tcl gcc-gfortran tcsh tk

[root@p1311-met1 ~]# tar -xf MLNX_OFED_LINUX-4.5-1.0.1.0-rhel7.6alternate-ppc64le.tgz

[root@p1311-met1 ~]# cd MLNX_OFED_LINUX-4.5-1.0.1.0-rhel7.6alternate-ppc64le
[root@p1311-met1 MLNX_OFED_LINUX-4.5-1.0.1.0-rhel7.6alternate-ppc64le]# ls
common_installers.pl            distro            LICENSE                     RPM-GPG-KEY-Mellanox  src
common.pl                       docs              mlnx_add_kernel_support.sh  RPMS                  uninstall.sh
create_mlnx_ofed_installers.pl  is_kmp_compat.sh  mlnxofedinstall             RPMS_UPSTREAM_LIBS

[root@p1311-met1 MLNX_OFED_LINUX-4.5-1.0.1.0-rhel7.6alternate-ppc64le]# ./mlnxofedinstall
Detected rhel7u6alternate ppc64le. Disabling installing 32bit rpms...
Logs dir: /tmp/MLNX_OFED_LINUX.13901.logs
General log file: /tmp/MLNX_OFED_LINUX.13901.logs/general.log
Verifying KMP rpms compatibility with target kernel...
This program will install the MLNX_OFED_LINUX package on your machine.
Note that all other Mellanox, OEM, OFED, RDMA or Distribution IB packages will be removed.
Those packages are removed due to conflicts with MLNX_OFED_LINUX, do not reinstall them.

Do you want to continue?[y/N]:y

----------------------------------------

WML-CE 1.6.2 버전을 설치하기 앞서, Anaconda installer 2019.07 버전을 다운로드합니다. 

[root@p1311-met1 ~]# wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-ppc64le.sh

[root@p1311-met1 ~]# chmod +x Anaconda3-2019.07-Linux-ppc64le.sh
[root@p1311-met1 ~]# ./Anaconda3-2019.07-Linux-ppc64le.sh
Welcome to Anaconda3 2019.07

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> ENTER키 입력

(생략)
Do you accept the license terms? [yes|no]
[no] >>> yes

Anaconda3 will now be installed into this location:
/root/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/root/anaconda3] >>> /opt/anaconda3

(생략)

Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes
no change     /opt/anaconda3/condabin/conda
no change     /opt/anaconda3/bin/conda
no change     /opt/anaconda3/bin/conda-env
no change     /opt/anaconda3/bin/activate
no change     /opt/anaconda3/bin/deactivate
no change     /opt/anaconda3/etc/profile.d/conda.sh
no change     /opt/anaconda3/etc/fish/conf.d/conda.fish
no change     /opt/anaconda3/shell/condabin/Conda.psm1
no change     /opt/anaconda3/shell/condabin/conda-hook.ps1
no change     /opt/anaconda3/lib/python3.7/site-packages/xontrib/conda.xsh
no change     /opt/anaconda3/etc/profile.d/conda.csh
modified      /root/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

[root@p1311-met1 ~]# export PATH=/opt/anaconda3/bin:$PATH


/opt/anaconda3 경로에 Anaconda를 설치완료했습니다. WML-CE를 설치하기 위한 ibm repository channel을 등록합니다.

[root@p1311-met1 ~]# conda config --prepend channels \
> https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/

[root@p1311-met1 ~]# conda create --name wmlce_env python=3.6
Proceed ([y]/n)? y

Downloading and Extracting Packages
libffi-3.3           | 56 KB     | ############################################################################################################### | 100%
ncurses-6.2          | 853 KB    | ############################################################################################################### | 100%
readline-8.0         | 478 KB    | ############################################################################################################### | 100%
sqlite-3.31.1        | 2.4 MB    | ############################################################################################################### | 100%
xz-5.2.5             | 495 KB    | ############################################################################################################### | 100%
ca-certificates-2020 | 125 KB    | ############################################################################################################### | 100%
ld_impl_linux-ppc64l | 797 KB    | ############################################################################################################### | 100%
libgcc-ng-8.2.0      | 4.8 MB    | ############################################################################################################### | 100%
certifi-2020.4.5.1   | 155 KB    | ############################################################################################################### | 100%
wheel-0.34.2         | 51 KB     | ############################################################################################################### | 100%
openssl-1.1.1g       | 2.5 MB    | ############################################################################################################### | 100%
pip-20.0.2           | 1.7 MB    | ############################################################################################################### | 100%
python-3.6.10        | 29.9 MB   | ############################################################################################################### | 100%
setuptools-47.1.1    | 514 KB    | ############################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate wmlce_env
#
# To deactivate an active environment, use
#
#     $ conda deactivate

[root@p1311-met1 ~]# conda init bash
no change     /opt/anaconda3/condabin/conda
no change     /opt/anaconda3/bin/conda
no change     /opt/anaconda3/bin/conda-env
no change     /opt/anaconda3/bin/activate
no change     /opt/anaconda3/bin/deactivate
no change     /opt/anaconda3/etc/profile.d/conda.sh
no change     /opt/anaconda3/etc/fish/conf.d/conda.fish
no change     /opt/anaconda3/shell/condabin/Conda.psm1
no change     /opt/anaconda3/shell/condabin/conda-hook.ps1
no change     /opt/anaconda3/lib/python3.7/site-packages/xontrib/conda.xsh
no change     /opt/anaconda3/etc/profile.d/conda.csh
no change     /root/.bashrc
No action taken.

세션에 재접속 후, conda activate 를 수행합니다.
(base) [root@p1311-met1 ~]# conda activate wmlce_env
(wmlce_env) [root@p1311-met1 ~]#
(wmlce_env) [root@p1311-met1 ~]# export IBM_POWERAI_LICENSE_ACCEPT=yes
(wmlce_env) [root@p1311-met1 ~]# conda search powerai
Loading channels: done
# Name                       Version           Build  Channel
powerai                        1.6.0     424.9f195f4  ibmdl/export/pub/software/server/ibm-ai/conda
powerai                        1.6.1    511.g0f4acb3  ibmdl/export/pub/software/server/ibm-ai/conda
powerai                        1.6.2    615.g1dade79  ibmdl/export/pub/software/server/ibm-ai/conda
powerai                        1.7.0    679.g5b5a006  ibmdl/export/pub/software/server/ibm-ai/conda

(wmlce_env) [root@p1311-met1 ~]# conda install powerai==1.6.2
Proceed ([y]/n)? y

Downloading and Extracting Packages
dask-2.3.0           | 12 KB     | ############################################################################################################### | 100%
sortedcontainers-2.1 | 45 KB     | ############################################################################################################### | 100%
keras-applications-1 | 32 KB     | ############################################################################################################### | 100%
powerai-license-1.6. | 6.4 MB    | ############################################################################################################### | 100%
libvpx-1.7.0         | 2.6 MB    | ############################################################################################################### | 100%
opencv-3.4.7         | 4 KB      | ############################################################################################################### | 100%
gnutls-3.6.5         | 2.1 MB    | ############################################################################################################### | 100%
tensorflow-1.15.2    | 4 KB      | ############################################################################################################### | 100%
libopencv-3.4.7      | 17.1 MB   | ############################################################################################################### | 100%
gast-0.2.2           | 138 KB    | ############################################################################################################### | 100%
cudnn-7.6.3_10.1     | 472.5 MB  | ############################################################################################################### | 100%
fsspec-0.7.4         | 63 KB     | ############################################################################################################### | 100%
torchvision-base-0.4 | 3.0 MB    | ############################################################################################################### | 100%
termcolor-1.1.0      | 7 KB      | ############################################################################################################### | 100%
lame-3.100           | 384 KB    | ############################################################################################################### | 100%
typing-3.6.4         | 44 KB     | ############################################################################################################### | 100%
libxgboost-base-0.90 | 168.4 MB  | ############################################################################################################### | 100%
more-itertools-8.3.0 | 43 KB     | ############################################################################################################### | 100%
nomkl-3.0            | 6 KB      | ############################################################################################################### | 100%
pciutils-3.6.2       | 324 KB    | ############################################################################################################### | 100%
python-lmdb-0.94     | 142 KB    | ############################################################################################################### | 100%
_pytorch_select-2.0  | 3 KB      | ############################################################################################################### | 100%
powerai-1.6.2        | 3 KB      | ############################################################################################################### | 100%
tblib-1.6.0          | 16 KB     | ############################################################################################################### | 100%
powerai-tools-1.6.2  | 7 KB      | ############################################################################################################### | 100%
pytorch-base-1.2.0   | 517.1 MB  | ############################################################################################################### | 100%
psutil-5.5.0         | 317 KB    | ############################################################################################################### | 100%
heapdict-1.0.1       | 9 KB      | ############################################################################################################### | 100%
libopenblas-0.3.6    | 5.0 MB    | ############################################################################################################### | 100%
boost-1.67.0         | 11 KB     | ############################################################################################################### | 100%
snapml-spark-1.4.0   | 1.6 MB    | ############################################################################################################### | 100%
py-xgboost-gpu-0.90  | 3 KB      | ############################################################################################################### | 100%
future-0.17.1        | 698 KB    | ############################################################################################################### | 100%
libtiff-4.1.0        | 492 KB    | ############################################################################################################### | 100%
nettle-3.4.1         | 4.3 MB    | ############################################################################################################### | 100%
openh264-2.1.0       | 1.9 MB    | ############################################################################################################### | 100%
dask-cuda-0.9.1      | 25 KB     | ############################################################################################################### | 100%
_tflow_select-2.1.0  | 3 KB      | ############################################################################################################### | 100%
cryptography-2.9.2   | 540 KB    | ############################################################################################################### | 100%
scipy-1.3.1          | 14.1 MB   | ############################################################################################################### | 100%
ddl-1.5.0            | 763 KB    | ############################################################################################################### | 100%
chardet-3.0.4        | 197 KB    | ############################################################################################################### | 100%
wrapt-1.11.2         | 48 KB     | ############################################################################################################### | 100%
tensorflow-gpu-1.15. | 3 KB      | ############################################################################################################### | 100%
grpcio-1.16.1        | 1.1 MB    | ############################################################################################################### | 100%
glog-0.3.5           | 161 KB    | ############################################################################################################### | 100%
markdown-3.1.1       | 113 KB    | ############################################################################################################### | 100%
pai4sk-1.5.0         | 7.6 MB    | ############################################################################################################### | 100%
pandas-1.0.3         | 7.8 MB    | ############################################################################################################### | 100%
jinja2-2.11.2        | 103 KB    | ############################################################################################################### | 100%
bokeh-2.0.2          | 5.3 MB    | ############################################################################################################### | 100%
pytorch-1.2.0        | 3 KB      | ############################################################################################################### | 100%
spectrum-mpi-10.03   | 22.3 MB   | ############################################################################################################### | 100%
click-7.0            | 118 KB    | ############################################################################################################### | 100%
networkx-2.2         | 2.0 MB    | ############################################################################################################### | 100%
py-opencv-3.4.7      | 1.5 MB    | ############################################################################################################### | 100%
torchtext-0.4.0      | 1.1 MB    | ############################################################################################################### | 100%
decorator-4.4.2      | 14 KB     | ############################################################################################################### | 100%
harfbuzz-1.8.8       | 1001 KB   | ############################################################################################################### | 100%
keras-preprocessing- | 37 KB     | ############################################################################################################### | 100%
tensorflow-base-1.15 | 548.5 MB  | ############################################################################################################### | 100%
cytoolz-0.10.1       | 390 KB    | ############################################################################################################### | 100%
google-pasta-0.1.6   | 82 KB     | ############################################################################################################### | 100%
tensorflow-serving-a | 36 KB     | ############################################################################################################### | 100%
matplotlib-3.1.3     | 21 KB     | ############################################################################################################### | 100%
joblib-0.13.2        | 365 KB    | ############################################################################################################### | 100%
caffe-1.0_1.6.2      | 3 KB      | ############################################################################################################### | 100%
simsearch-1.1.0      | 26.0 MB   | ############################################################################################################### | 100%
cloudpickle-1.4.1    | 30 KB     | ############################################################################################################### | 100%
glib-2.63.1          | 1.9 MB    | ############################################################################################################### | 100%
hypothesis-3.59.1    | 352 KB    | ############################################################################################################### | 100%
absl-py-0.7.1        | 157 KB    | ############################################################################################################### | 100%
py-1.8.1             | 71 KB     | ############################################################################################################### | 100%
leveldb-1.20         | 394 KB    | ############################################################################################################### | 100%
protobuf-3.8.0       | 699 KB    | ############################################################################################################### | 100%
matplotlib-base-3.1. | 5.0 MB    | ############################################################################################################### | 100%
uff-0.6.5            | 79 KB     | ############################################################################################################### | 100%
dask-core-2.3.0      | 545 KB    | ############################################################################################################### | 100%
mock-2.0.0           | 104 KB    | ############################################################################################################### | 100%
libprotobuf-3.8.0    | 6.6 MB    | ############################################################################################################### | 100%
pycparser-2.20       | 92 KB     | ############################################################################################################### | 100%
gflags-2.2.2         | 238 KB    | ############################################################################################################### | 100%
ninja-1.9.0          | 1.9 MB    | ############################################################################################################### | 100%
powerai-release-1.6. | 3 KB      | ############################################################################################################### | 100%
atomicwrites-1.4.0   | 11 KB     | ############################################################################################################### | 100%
jasper-2.0.14        | 1.4 MB    | ############################################################################################################### | 100%
libopus-1.3.1        | 879 KB    | ############################################################################################################### | 100%
tensorflow-probabili | 2.1 MB    | ############################################################################################################### | 100%
urllib3-1.25.8       | 166 KB    | ############################################################################################################### | 100%
pyparsing-2.4.7      | 65 KB     | ############################################################################################################### | 100%
openblas-devel-0.3.6 | 74 KB     | ############################################################################################################### | 100%
numba-0.45.1         | 3.2 MB    | ############################################################################################################### | 100%
graphite2-1.3.13     | 109 KB    | ############################################################################################################### | 100%
x264-1!157.20191217  | 3.1 MB    | ############################################################################################################### | 100%
cycler-0.10.0        | 13 KB     | ############################################################################################################### | 100%
tensorflow-large-mod | 60 KB     | ############################################################################################################### | 100%
zict-2.0.0           | 13 KB     | ############################################################################################################### | 100%
numpy-base-1.16.6    | 3.5 MB    | ############################################################################################################### | 100%
dask-xgboost-0.1.7   | 23 KB     | ############################################################################################################### | 100%
numpy-1.16.6         | 47 KB     | ############################################################################################################### | 100%
pytz-2020.1          | 184 KB    | ############################################################################################################### | 100%
pyyaml-5.3.1         | 171 KB    | ############################################################################################################### | 100%
locket-0.2.0         | 8 KB      | ############################################################################################################### | 100%
packaging-20.3       | 36 KB     | ############################################################################################################### | 100%
numactl-2.0.12       | 139 KB    | ############################################################################################################### | 100%
pyopenssl-19.1.0     | 86 KB     | ############################################################################################################### | 100%
py-xgboost-base-0.90 | 84.7 MB   | ############################################################################################################### | 100%
nccl-2.4.8           | 137.4 MB  | ############################################################################################################### | 100%
requests-2.22.0      | 90 KB     | ############################################################################################################### | 100%
partd-1.1.0          | 20 KB     | ############################################################################################################### | 100%
llvmlite-0.29.0      | 16.6 MB   | ############################################################################################################### | 100%
_py-xgboost-mutex-1. | 7 KB      | ############################################################################################################### | 100%
openblas-0.3.6       | 19 KB     | ############################################################################################################### | 100%
c-ares-1.15.0        | 107 KB    | ############################################################################################################### | 100%
lmdb-0.9.22          | 506 KB    | ############################################################################################################### | 100%
python-dateutil-2.8. | 215 KB    | ############################################################################################################### | 100%
h5py-2.8.0           | 962 KB    | ############################################################################################################### | 100%
pysocks-1.7.1        | 30 KB     | ############################################################################################################### | 100%
idna-2.8             | 133 KB    | ############################################################################################################### | 100%
pywavelets-1.1.1     | 4.4 MB    | ############################################################################################################### | 100%
pluggy-0.13.1        | 32 KB     | ############################################################################################################### | 100%
six-1.12.0           | 22 KB     | ############################################################################################################### | 100%
freeglut-3.0.0       | 308 KB    | ############################################################################################################### | 100%
markupsafe-1.1.1     | 30 KB     | ############################################################################################################### | 100%
zipp-3.1.0           | 13 KB     | ############################################################################################################### | 100%
importlib_metadata-1 | 11 KB     | ############################################################################################################### | 100%
lz4-c-1.9.2          | 261 KB    | ############################################################################################################### | 100%
kiwisolver-1.2.0     | 93 KB     | ############################################################################################################### | 100%
apex-0.1.0_1.6.2     | 1.6 MB    | ############################################################################################################### | 100%
astor-0.7.1          | 43 KB     | ############################################################################################################### | 100%
tabulate-0.8.2       | 36 KB     | ############################################################################################################### | 100%
attrs-19.3.0         | 40 KB     | ############################################################################################################### | 100%
typing_extensions-3. | 41 KB     | ############################################################################################################### | 100%
libglu-9.0.0         | 635 KB    | ############################################################################################################### | 100%
tensorboard-1.15.0   | 3.8 MB    | ############################################################################################################### | 100%
graphsurgeon-0.4.1   | 27 KB     | ############################################################################################################### | 100%
pillow-7.0.0         | 649 KB    | ############################################################################################################### | 100%
ddl-tensorflow-1.5.0 | 2.4 MB    | ############################################################################################################### | 100%
scikit-learn-0.22.1  | 4.9 MB    | ############################################################################################################### | 100%
cudatoolkit-10.1.243 | 510.3 MB  | ############################################################################################################### | 100%
caffe-base-1.0_1.6.2 | 27.6 MB   | ############################################################################################################### | 100%
tornado-6.0.4        | 597 KB    | ############################################################################################################### | 100%
onnx-1.5.0           | 2.9 MB    | ############################################################################################################### | 100%
scikit-image-0.15.0  | 28.2 MB   | ############################################################################################################### | 100%
imageio-2.8.0        | 3.0 MB    | ############################################################################################################### | 100%
tensorrt-6.0.1.5     | 437.3 MB  | ############################################################################################################### | 100%
tensorflow-estimator | 666 KB    | ############################################################################################################### | 100%
libxml2-2.9.10       | 1.3 MB    | ############################################################################################################### | 100%
pbr-5.4.4            | 76 KB     | ############################################################################################################### | 100%
cffi-1.12.3          | 236 KB    | ############################################################################################################### | 100%
distributed-2.3.2    | 369 KB    | ############################################################################################################### | 100%
python-3.6.10        | 29.9 MB   | ############################################################################################################### | 100%
olefile-0.46         | 48 KB     | ############################################################################################################### | 100%
icu-58.2             | 10.9 MB   | ############################################################################################################### | 100%
ffmpeg-4.2.2         | 70.3 MB   | ############################################################################################################### | 100%
tf_cnn_benchmarks-1. | 189 KB    | ############################################################################################################### | 100%
zstd-1.4.4           | 1009 KB   | ############################################################################################################### | 100%
msgpack-python-1.0.0 | 93 KB     | ############################################################################################################### | 100%
libboost-1.67.0      | 22.1 MB   | ############################################################################################################### | 100%
py-boost-1.67.0      | 358 KB    | ############################################################################################################### | 100%
pytest-4.4.2         | 358 KB    | ############################################################################################################### | 100%
importlib-metadata-1 | 49 KB     | ############################################################################################################### | 100%
coverage-4.5.4       | 227 KB    | ############################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

위 과정이 완료되면 Powerai(WML-CE) 1.6.2 버전에서 함께 제공되는 패키지가 모두 설치된 것입니다. 주로 제공되는 패키지는 아래의 목록에 포함되어 있고, 이 외에도 포함된 패키지들이 있습니다. 


Anaconda에 등록된 채널 중, ibm 제공 채널에서 제공하는 패키지를 우선적으로 설치하려는 경우, 아래의 명령어로 채널 우선순위를 고정시켜 두거나, 패키지 설치 명령 뒤에 채널을 임의로 명기할 수도 있습니다.

conda config --show
conda config --set channel_priority strict
conda install pytorch powerai-release=1.6.2

설치된 패키지를 실행하여, gpu를 이용하여 동작 가능한지 확인해봅니다.

(wmlce_env) [root@p1311-met1 ~]# python
Python 3.6.10 |Anaconda, Inc.| (default, Mar 26 2020, 00:22:27)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2020-06-15 03:32:52.174173: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
>>> tf.test.gpu_device_name()
2020-06-15 03:33:01.615986: I tensorflow/core/platform/profile_utils/cpu_utils.cc:101] CPU Frequency: 3783000000 Hz
2020-06-15 03:33:01.671666: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1222ac670 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-06-15 03:33:01.671693: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-06-15 03:33:01.675095: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-06-15 03:33:02.262105: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x12236ac60 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-06-15 03:33:02.262149: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Tesla V100-SXM2-32GB, Compute Capability 7.0
2020-06-15 03:33:02.262158: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (1): Tesla V100-SXM2-32GB, Compute Capability 7.0
2020-06-15 03:33:02.262165: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (2): Tesla V100-SXM2-32GB, Compute Capability 7.0
2020-06-15 03:33:02.262173: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (3): Tesla V100-SXM2-32GB, Compute Capability 7.0
2020-06-15 03:33:02.267713: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: Tesla V100-SXM2-32GB major: 7 minor: 0 memoryClockRate(GHz): 1.53
pciBusID: 0004:04:00.0
2020-06-15 03:33:02.270363: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 1 with properties:
name: Tesla V100-SXM2-32GB major: 7 minor: 0 memoryClockRate(GHz): 1.53
pciBusID: 0004:05:00.0
2020-06-15 03:33:02.272889: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 2 with properties:
name: Tesla V100-SXM2-32GB major: 7 minor: 0 memoryClockRate(GHz): 1.53
pciBusID: 0035:03:00.0
2020-06-15 03:33:02.275410: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 3 with properties:
name: Tesla V100-SXM2-32GB major: 7 minor: 0 memoryClockRate(GHz): 1.53
pciBusID: 0035:04:00.0
2020-06-15 03:33:02.275435: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-06-15 03:33:02.276784: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2020-06-15 03:33:02.277831: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2020-06-15 03:33:02.278243: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2020-06-15 03:33:02.279466: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2020-06-15 03:33:02.280453: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2020-06-15 03:33:02.283459: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-06-15 03:33:02.303752: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0, 1, 2, 3
2020-06-15 03:33:02.303784: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-06-15 03:33:03.783369: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-06-15 03:33:03.783427: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186]      0 1 2 3
2020-06-15 03:33:03.783443: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0:   N Y Y Y
2020-06-15 03:33:03.783460: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 1:   Y N Y Y
2020-06-15 03:33:03.783476: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 2:   Y Y N Y
2020-06-15 03:33:03.783491: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 3:   Y Y Y N
2020-06-15 03:33:03.796899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/device:GPU:0 with 30459 MB memory) -> physical GPU (device: 0, name: Tesla V100-SXM2-32GB, pci bus id: 0004:04:00.0, compute capability: 7.0)
2020-06-15 03:33:03.801573: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/device:GPU:1 with 30459 MB memory) -> physical GPU (device: 1, name: Tesla V100-SXM2-32GB, pci bus id: 0004:05:00.0, compute capability: 7.0)
2020-06-15 03:33:03.806183: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/device:GPU:2 with 30459 MB memory) -> physical GPU (device: 2, name: Tesla V100-SXM2-32GB, pci bus id: 0035:03:00.0, compute capability: 7.0)
2020-06-15 03:33:03.810723: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/device:GPU:3 with 30459 MB memory) -> physical GPU (device: 3, name: Tesla V100-SXM2-32GB, pci bus id: 0035:04:00.0, compute capability: 7.0)
'/device:GPU:0'
>>>

tensorflow 에서 총 4개의 gpu를 확인할 수 있습니다. 이제 각 프레임워크를 이용하여 필요한 작업을 진행하시면 됩니다.

추가로 설치가 필요한 Python 관련 패키지의 경우, conda나 pip 명령어를 이용하여 설치하면 됩니다. 예를 들어 datetime 이라는 패키지의 경우, conda search 명령어로 찾으면 datetime 이라는 동일한 이름의 패키지를 찾을수가 없습니다. 반면에 pip search 명령어로는 바로 DateTime(4.3) 버전이 검색됩니다. conda로 검색되는 경우, conda install <패키지이름> 으로 설치할 수 있고, pip 로 검색되는 경우에는 pip install <패키지 이름> 으로 설치합니다.

(wmlce_env) [root@p1311-met1 ~]# conda search datetime
Loading channels: done
No match found for: datetime. Search: *datetime*
# Name                       Version           Build  Channel
parsedatetime                    2.4          py27_0  pkgs/main
parsedatetime                    2.4          py35_0  pkgs/main
parsedatetime                    2.4          py36_0  pkgs/main
parsedatetime                    2.4          py37_0  pkgs/main
parsedatetime                    2.4          py38_0  pkgs/main
r-assertive.datetimes           0.0_2   r36h6115d3f_0  pkgs/r
r-datetime                     0.1.4   r36h6115d3f_0  pkgs/r
r-datetimeutils                0.3_0   r36h6115d3f_0  pkgs/r

(wmlce_env) [root@p1311-met1 ~]# pip search datetime
DateTime (4.3)     

(wmlce_env) [root@p1311-met1 ~]# pip install datetime
Collecting datetime
  Downloading DateTime-4.3-py2.py3-none-any.whl (60 kB)
     |████████████████████████████████| 60 kB 4.6 MB/s
Collecting zope.interface
  Downloading zope.interface-5.1.0.tar.gz (225 kB)
     |████████████████████████████████| 225 kB 10.6 MB/s
Requirement already satisfied: pytz in /opt/anaconda3/envs/wmlce_env/lib/python3.6/site-packages (from datetime) (2020.1)
Requirement already satisfied: setuptools in /opt/anaconda3/envs/wmlce_env/lib/python3.6/site-packages (from zope.interface->datetime) (47.1.1.post20200604)
Building wheels for collected packages: zope.interface
  Building wheel for zope.interface (setup.py) ... done
  Created wheel for zope.interface: filename=zope.interface-5.1.0-cp36-cp36m-linux_ppc64le.whl size=232220 sha256=09c0d443c68581ba3773bc4097479cdc35276ba41ac2f9a5f75936113fa936df
  Stored in directory: /root/.cache/pip/wheels/4d/b1/d4/071ce5e5e22295b5c70b72f4df166ea45f8a60c9374c9feb3c
Successfully built zope.interface
Installing collected packages: zope.interface, datetime
Successfully installed datetime-4.3 zope.interface-5.1.0
(wmlce_env) [root@p1311-met1 ~]# conda list datetime
# packages in environment at /opt/anaconda3/envs/wmlce_env:
#
# Name                    Version                   Build  Channel
datetime                  4.3                      pypi_0    pypi