查看版本
ubuntu
cat /proc/version
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
CUDA 版本
nvcc --version
Cuda compilation tools, release 10.2, V10.2.89
CUDA_HOME=/usr/local/cuda
CUDNN
下载linux版本,解压
~/software$ tar -zxvf cudnn-10.2-linux-x64-v8.0.4.30.tgz
所有的文件会解压到~/software/cuda
以下都在~/software目录下操作
添加路径,其中/home/admin17/software/cuda/lib64
是我下载cudnn解压的路径
gedit ~/.bashrc
export LD_LIBRARY_PATH=/home/admin17/software/cuda/lib64:$LD_LIBRARY_PATH
source ~/.bashrc
重启终端
cd ~/software
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
有一些高版本的版本信息在cudnn_version.h 中,需要将cudnn_version.h 复制过去
sudo cp cuda/include/cudnn_version.h /usr/local/cuda/include
添加读写权限:
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
sudo chmod a+r /usr/local/cuda/include/cudnn_version.h
低版本查看版本的命令:
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
高版本查看版本的命令:
cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
输出
UDNN_MAJOR -A 2
#define CUDNN_MAJOR 8
#define CUDNN_MINOR 0
#define CUDNN_PATCHLEVEL 4
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#endif /* CUDNN_VERSION_H */
说明版本 8.0.4
conda
conda -V
conda 4.5.11
Anaconda
You need install anaconda at first, then run below
conda create -n platform python=3.7.0
conda activate platform
PyTorch
pip install torch==1.6.0
pip install torchvision==0.7.0
MMdetection
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
git checkout v2.8.0
pip install mmcv-full
pip install matplotlib==3.1.0
pip install -r requirements/build.txt
python setup.py develop
可能的错误:
gnutls_handshake() failed: The TLS connection was non-properly terminated.
网不好 重新 git clone https://github.com/open-mmlab/mmdetection.git
Pyinstaller
pip install pyinstaller
test_endecode
解压 /home/admin17/code/platform/test_endecode.zip
conda activate platform
cd ~/code/platform/test_endecode/
mkdir build
cmake …
报错
Could not find a package configuration file provided by “pybind11” with any
of the following names:
pybind11Config.cmake
pybind11-config.cmake
Add the installation prefix of “pybind11” to CMAKE_PREFIX_PATH or set
“pybind11_DIR” to a directory containing one of the above files. If
“pybind11” provides a separate development package or SDK, be sure it has
been installed.
查找Pyinstaller
pip show Pillow
Location: /home/admin17/anaconda3/envs/platform/lib/python3.7/site-packages
在Location 搜索pybind11Config.cmake 找到目录
/home/admin17/anaconda3/envs/platform/lib/python3.7/site-packages/pybind11/share/cmake/pybind11
在/home/admin17/code/platform/test_endecode/CMakeLists.txt中添加
set(pybind11_DIR /home/admin17/anaconda3/envs/platform/lib/python3.7/site-packages/pybind11/share/cmake/pybind11)
重新编译
conda activate platform
cd ~/code/platform/test_endecode/
mkdir build
cmake …
make
成功
gedit ~/.bashrc
在.bashrc中添加
export LD_LIBRARY_PATH=/home/admin17/code/platform/test_endecode/lib:$LD_LIBRARY_PATH
采用命令source ~/.bashrc激活
pytest-runner
pip install pytest-runner
pip install mmcv-full==1.2.6
sudo dpkg -i codemeter_7.0.3925.501_amd64.deb 不一定
/home/admin17/code/platform/utils/utils.py", line 11, in
import endecode
ModuleNotFoundError: No module named 'endecode’
我注释了endecode相关代码