Check CUDA & CUDNN version
#CUDA
nvidia-smi
nvcc -version
#CUDNN
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
---------------------------------------------result----------------------------------------
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 5
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"
Tensorflow version correspondence
tip: 安装anaconda前是不需要在系统上安装python滴~,安装anaconda时python也会被安装。
The archive has older versions of Anaconda Individual Edition installers
下载Anaconda X86_64版本到你指定的路径下
wget https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh
使用bash指令进行anaconda安装:
bash Anaconda3-5.3.1-Linux-x86_64.sh
配置环境变量(Anaconda3)
export PATH=~/anaconda3/bin:$PATH
安装完成后使用指令查看安装结果:
conda info
使用指令进行创建自己的环境并指定python版本
conda create -n your_env_name python=3.6
使用指令进入刚创建的环境下进行tensorflow安装:
source activate your_env_name
#check sources
conda config --show-sources
#add sources
conda config --add channels http://mirrors.aliyun.com/pypi/simple/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free
#delete sources
conda config --remove channels http://mirrors.aliyun.com/pypi/simple/
pip install tensorflow-gpu
pip install opencv
PS. 确保服务器GPU已经安装CUDA和CUDNN,需要将该环境引入到新账号的环境变量中:
# 1、编辑环境变量
vim ~/.bashrc
# 2、在文件的最后添加以下内容
# cuda-9.0
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
# 3、使用命令验证CUDA添加成功
nvcc -V
文件传输:FileZilla
Check Ubuntu Version:
$ lsb_release -a
Creating folders and files
$ mkdir /tmp/tutorial
$ cd /tmp/tutorial
$ mkdir dir1 dir2 dir3
$ ls
Anaconda managing environments
check CPU memory | $ top |
check GPU memory | #single checking #real time monitoring, refreshing once every second |
check disk space | $ df -h |
delete folder | rm -R folder-name |
rename folders | mv old-name new-name |
move folders | mv old-directory new-directory |
copy folders | cp -r old-directory new-directory #r-copy recursively |
shows current working directory | pwd |
list the detail information of files and folder of a current directory | ls -l / ll |
check directory size | du -sh path |