As I had encountered errors when I tried to install cupy,
I upgrade cudnn. Then I succeeded installation of cupy.
The following is a notes on the procedure.
- after uninstallation of existing pip, reinstall pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py -user -vv
python get-pip.py -user -vv
- install a recent cuda-toolkit
2-1. download the cuda toolkit from https://developer.nvidia.com/cuda-toolkit-archive
2.2 install cuda-toolkit
sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
- install cudnn
3-1 download packages for ubuntu18.04 from https://developer.nvidia.com/rdp/cudnn-download
3-2. install cudnn packages
sudo dpkg -i libcudnn7_7.3.1.20-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-dev_7.3.1.20-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-doc_7.3.1.20-1+cuda10.0_amd64.deb
3-3. replace the old cuda path with cuda-10.0 path
nano ~/.bashrc
NVIDIA CUDA Toolkit
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export CPATH=/usr/local/cuda/include:$CPATH
source ~/.bashrc
echo $PATH |grep cuda
- install cupy
pip3 install -user cupy
python3
import cupy
import cupy.cudnn
failed.
modulenotfounderror: no module named ‘cupy.cudnn’
I don’t know why CPATH didn’t work well, but I did the following
pip3 uninstall cupy
set $CUDA_PATH as /usr/local/cuda
(export CUDA_PATH=/usr/local/cuda:$CUDA_PATH on .bashrc)
pip3 -v install -user cupy -no-cache-dir
python3
import cupy
import cupy.cudnn
No error.
I encountered black screen when login after ubuntu upgrade from 17.10 to 18.04
My tentative solution has been the following.
sudo apt install nvidia-cuda-toolkit
sudo apt install clinfo
sudo apt-add-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
sudo reboot
nvidia-smi
clinfo
sudo apt install lightdm
(choose lightdm)
; countermeasurea black screen
sudo reboot
ubuntu 17.10でcuda8.0, nvidia-284でGNUバージョンエラーと/usr/bin/ld: cannot find-lnvcuvidエラー
NVIDIA_CUDA-8.0_Samplesでsampleをmakeしようとすると2種類のエラー発生したのでその対策
1.GNUバージョンエラー対策
$ sudo apt-get install gcc-4.8
$ sudo apt-get install g++-4.8
$ sudo update-alternatives ?install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
$ sudo update-alternatives ?install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
- /usr/bin/ld: cannot find -lnvcuvidエラー対策
$ sudo cp /usr/lib/nvidia-384/libnvcuvid.so /usr/local/cuda-8.0/lib64
$ sudo cp /usr/lib/nvidia-384/libnvcuvid.so.1 /usr/local/cuda-8.0/lib64
これでsampleがmakeできる様になり動かせた。
Cudaを入れて
/sbin/ldconfig.real: ~~ is not a symbolic link の場合の対処
sudo mv /usr/lib/nvidia-375/libEGL.so.1 /usr/lib/nvidia-375/libEGL.so.1.org
sudo mv /usr/lib32/nvidia-375/libEGL.so.1 /usr/lib32/nvidia-375/libEGL.so.1.org
sudo ln -s /usr/lib/nvidia-375/libEGL.so.375.39 /usr/lib/nvidia-375/libEGL.so.1
sudo ln -s /usr/lib32/nvidia-375/libEGL.so.375.39 /usr/lib32/nvidia-375/libEGL.so.1
sudo mv /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so.5 /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so.5.org
sudo ln -s /usr/local/lib/libcudnn.so.5.1.10 /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so.5
Thanks to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-375/+bug/1662860
いつの間にかxrdpがブルースクリーンとなり、connection problem giving upとなってし
まう様になったので、いろいろ調べて対策。
On an unknown day, xrdp failed with blue screen by connection problem giving up.
I eventually found a solution through the Internet.
/etc/X11/Xwrapper.config
'original
allowed_users=console
'modified
allowed_users=anybody
hint:
'https://anonscm.debian.org/cgit/pkg-remote/xrdp.git/tree/debian/README.Debian