UserName@ServerName:~$ sudo su root [sudo] password for UserName: ←UserNameのパスワードを入れる root@ServerName:/home/UserName# _
$ date Tue Aug 4 05:20:05 UTC 2020 $ sudo timedatectl set-timezone Asia/Tokyo $ date Tue Aug 4 14:20:43 JST 2020
$ sudo apt update $ sudo apt upgrade
$ sudo python3 -m pip install numpy $ sudo python3 -m pip install matplotlib
$ sudo chmod 777 /opt ここで、WinSCPソフトなどを使用して上記3ファイルを/optにコピーする。 $ sudo chmod 755 /opt
# tar zxfv mecab-0.996.tar.gz # cd mecab-0.996 # ./configure --enable-utf8-only # make # make check # make install
# tar zxfv mecab-ipadic-2.7.0-20070801.tar.gz # cd mecab-ipadic-2.7.0-20070801 # ./configure --with-charset=utf8 # export LD_LIBRARY_PATH="/usr/local/lib" # make # make install
# tar zxfv mecab-python-0.996.tar.gz # cd mecab-python-0.996 # pip3 install mecab-python3
# cd ..(移動しないとimport MeCabでエラーが出る) # python3 Python 3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> import MeCab >>> m = MeCab.Tagger ("-Ochasen") >>> print(m.parse("今日もしないとね")) 今日 キョウ 今日 名詞-副詞可能 も モ も 助詞-係助詞 し シ する 動詞-自立 サ変・スル 未然形 ない ナイ ない 助動詞 特殊・ナイ 基本形 と ト と 助詞-接続助詞 ね ネ ね 助詞-終助詞 EOS >>>
$ ls -l /dev/sd* brw-rw---- 1 root disk 8, 0 Aug 4 21:21 /dev/sda brw-rw---- 1 root disk 8, 1 Aug 4 21:21 /dev/sda1 brw-rw---- 1 root disk 8, 2 Aug 4 21:21 /dev/sda2 ここでusbメモリを接続すると、/dev/sdbと/dev/sdb1が増えている。 $ ls -l /dev/sd* brw-rw---- 1 root disk 8, 0 Aug 4 21:21 /dev/sda brw-rw---- 1 root disk 8, 1 Aug 4 21:21 /dev/sda1 brw-rw---- 1 root disk 8, 2 Aug 4 21:21 /dev/sda2 brw-rw---- 1 root disk 8, 16 Aug 6 10:18 /dev/sdb brw-rw---- 1 root disk 8, 17 Aug 6 10:18 /dev/sdb1 /dev/sdb1をマウントした後、$dfコマンドで確認すると/dev/sdb1が/mediaとしてマウントされているので、/media以下のファイルがコピー可能になる。 $ sudo mount -t vfat /dev/sdb1 /media $df ・・・ /dev/sdb1 3998656 160 3998496 1% /media /media からコピーした後は、必ずアンマウントしてからusbメモリを抜く。 $ sudo umount /media
# vi /etc/netplan/50-cloud-init.yaml # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: enp3s0: dhcp4: no dhcp6: no addresses: [192.168.1.15/24] gateway4: 192.168.1.1 nameservers: addresses: [192.168.1.1, 8.8.8.8, 8.8.4.4] enp4s0: dhcp4: no dhcp6: no addresses: [192.168.1.14/24] gateway4: 192.168.1.1 nameservers: addresses: [192.168.1.1, 8.8.8.8, 8.8.4.4] version: 2
# vi /etc/modprobe.d/blacklist-nouveau.conf blacklist nouveau options nouveau modeset=0 :wで書き込んで、以下の要領でUbuntuをリブートします。 # update-initramfs -u # reboot
# sh NVIDIA-Linux-x86_64-435.21.run Verifying archive integrity... OK Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 435.21 ........................................................................................................................................................................................................... ........................................................................................................................................................................................................... ..................................................................................................................................
The target kernel has CONFIG_MODULE_SIG set, which means that it supports cryptographic signatures on kernel modules. On some systems, the kernel may refuse to load modules without a valid signature from a trusted key. This system also has UEFI Secure Boot enabled; many distributions enforce module signature verification on UEFI systems when Secure Boot is enabled. Would you like to sign the NVIDIA kernel module? Sign the kernel module 〇 Install without signing
Would you like to sign the NVIDIA kernel module with an existing key pair, or would you like to generate a new one? Use an existing key pair Generate a new key pair 〇
The NVIDIA kernel module was successfully signed with a newly generated key pair. Would you like to delete the private signing key? Yes 〇 No
An X.509 certificate containing the public signing key will be installed to /usr/share/nvidia/nvidia-modsign-crt-A7C*****.der. The SHA1 fingerprint of this certificate is: 86:19:2C:2F:78:35:5E:C4:19:53:5A:6A:4B:33:AA:1E:D9:F5:76:3F. ※公開鍵ファイル/usr/share/nvidia/nvidia-modsign-crt-A7C*****.derは、その後の公開鍵の登録で必要になりますので必ずメモを残しておきましょう。 This certificate must be added to a key database which is trusted by your kernel in order for the kernel to be able to verify the module signature. OK
The signed kernel module failed to load, because the kernel does not trust any key which is capable of verifying the module signature. Would you like to install the signed kernel module anyway? Note that you will not be able to load the installed module until after a key that can verify the module signature is added to a key database that is trusted by the kernel. This will likely require rebooting your computer. Install signed kernel module 〇 Abort installation
WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and X module path '/usr/lib/xorg/modules'; these paths were not queryable from the system. If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver. OK
WARNING: Unable to find a suitable destination to install 32-bit compatibility libraries. Your system may not be set up for 32-bit compatibility. 32-bit compatibility files will not be installed; if you wish to install them, re-run the installation and set a valid directory with the --compat32-libdir option. OK
Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. Yes No 〇
Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 435.21) is now complete. Please update your xorg.conf file as appropriate; see the file /usr/share/doc/NVIDIA_GLX-1.0/README.txt for details. OK
サーバーがセキュアブートかどうかを確認する。 $ dmesg | grep Secure [ 0.000000] secureboot: Secure boot enabled 公開鍵の登録(ドライバーインストール時に出力された公開鍵ファイルをパスワードを設定して登録) $ sudo mokutil --import /usr/share/nvidia/nvidia-modsign-crt-A7C*****.der input password: ******** input password again: ******** リブートしてコンソールのMOK management画面で公開鍵のパスワードを入れてenroll $ reboot
$ lspci | grep -i nvidia 01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
$ uname -m && cat /etc/*release x86_64 DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic
$ gcc --version gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -r 4.15.0-112-generic
$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin $ sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 $ wget http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda-repo-ubuntu1804-11-0-local_11.0.2-450.51.05-1_amd64.deb $ sudo dpkg -i cuda-repo-ubuntu1804-11-0-local_11.0.2-450.51.05-1_amd64.deb $ sudo apt-key add /var/cuda-repo-ubuntu1804-11-0-local/7fa2af80.pub $ sudo apt-get update $ sudo apt-get -y install cuda
$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin $ sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 $ wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb $ sudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb $ sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub $ sudo apt-get update $ sudo apt-get -y install cuda
Your system has UEFI Secure Boot enabled. │ │ │ │ UEFI Secure Boot requires additional configuration to work with third-party drivers. │ │ │ │ The system will assist you in configuring UEFI Secure Boot. To permit the use of third-party drivers, │ │ a new Machine-Owner Key (MOK) has been generated. This key now needs to be enrolled in your system's │ │ firmware. │ │ │ │ To ensure that this change is being made by you as an authorized user, and not by an attacker, you │ │ must choose a password now and then confirm the change after reboot using the same password, in both │ │ the "Enroll MOK" and "Change Secure Boot state" menus that will be presented to you when this system │ │ reboots. │ │ │ │ If you proceed but do not confirm the password upon reboot, Ubuntu will still be able to boot on your │ │ system but any hardware that requires third-party drivers to work correctly may not be usable. │ │ │ ││ │ │
$ nvidia-smi Tue Aug 4 20:21:04 2020 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 435.21 Driver Version: 435.21 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 GeForce GTX 1080 Off | 00000000:01:00.0 Off | N/A | | 0% 43C P5 16W / 240W | 0MiB / 8119MiB | 2% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+
$ pip3 install cupy-cuda101 Collecting cupy-cuda101 ・・・・・・・・・・ Successfully installed cupy-cuda101-7.7.0 fastrlock-0.5 numpy-1.19.1 six-1.15.0 インストールしたCuPyのバージョン確認 $ pip3 freeze | grep cupy cupy-cuda101==7.7.0
* 無断転載禁止。
* どのページでもご自由にリンクして下さい。
* ご意見・ご質問等がございましたら
こちらからメールをご送付下さい。
無料SEO対策
-172.31.37.45。