Ubuntu18.04
Nvidia driver-440
Anaconda3
CUDA9.0
CUDNN7.5
TensorFlow1.14
pycharm2017
Android Studio
# 其他
Chrome Google
搜狗输入法
deepin-wine生态
(1)Anaconda3-5.2.0-Linux-x86_64.sh 大约621.55M
(2)cuda_9.0.176_384.81_linux.run 大约1.53G
(3)cudnn-9.0-linux-x64-v7.5.0.56.tgz 大约357.11M,最小但却是下载最慢的那个
其中:
(1)Anaconda3-5.2.0-Linux-x86_64.sh
的文件下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
可以打开迅雷,在下载任务中,输入资源完整地址后下载,这种方式不仅快,还支持断点续传。资源完整地址(把下面的链接放入迅雷,直接下载):https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.2.0-Linux-x86_64.sh
(2)cuda_9.0.176_384.81_linux.run
的下载地址(把下面的链接放入迅雷,直接下载):https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
(3)cudnn-9.0-linux-x64-v7.5.0.56.tgz
的下载地址:(这种方法免注册账号,但是无法通过迅雷下载)
https://dl.ypw.io/ubuntu-environment/
reference here
给ubuntu添加驱动的源:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
查看设备型号得到推荐安装的驱动型号:
ubuntu-drivers devices
结果:
dj@dj:~$ ubuntu-drivers devices
== /sys/devices/pci0000:b2/0000:b2:00.0/0000:b3:00.0 ==
modalias : pci:v000010DEd00001BB1sv00001028sd000011A3bc03sc00i00
vendor : NVIDIA Corporation
model : GP104GL [Quadro P4000]
driver : nvidia-driver-410 - third-party free
driver : nvidia-driver-435 - distro non-free
driver : nvidia-driver-415 - third-party free
driver : nvidia-driver-440 - third-party free recommended
driver : nvidia-driver-390 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
自动安装显卡驱动:
sudo ubuntu-drivers autoinstall
重启:
sudo reboot
如果重启一切顺利就检查是否成功安装:
nvidia-smi
出现下面的画面表示成功安装显卡驱动:
dj@dj:~$ nvidia-smi
Tue Apr 28 16:57:24 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82 Driver Version: 440.82 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro P4000 Off | 00000000:B3:00.0 On | N/A |
| 46% 39C P8 8W / 105W | 406MiB / 8118MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1285 G /usr/lib/xorg/Xorg 39MiB |
| 0 1429 G /usr/bin/gnome-shell 53MiB |
| 0 1636 G /usr/lib/xorg/Xorg 131MiB |
| 0 1782 G /usr/bin/gnome-shell 80MiB |
| 0 2141 G ...AAAAAAAAAAAACAAAAAAAAAA= --shared-files 98MiB |
+-----------------------------------------------------------------------------+
dj@dj:~$
在安装包所在文件夹,右键打开终端,输入下列命令让文件具有可执行权限:
chmod +x Anaconda3-5.2.0-Linux-x86_64.sh
开始安装:
./Anaconda3-5.2.0-Linux-x86_64.sh
一路回车,直到需要输入“yes”,表示同意安装在指定位置,回车,开始安装。
安装完成后又需要输入“yes”,输入并回车,等着,出现如下画面:
复制这句话(如果有的话,如果没有出现上图那种,也不妨打开文件瞅一眼文件末尾,是不是自动加上了这句话):
export PATH=/home/dj/anaconda3/bin:$PATH
关闭当前中断,新开一个终端,输入下列命令打开一个文件:
sudo gedit ~/.bashrc
在文件末尾另起一行,把刚刚复制的那句话粘贴到文件末尾。
保存并关闭文件后,在命令行输入命令让改变生效:
source ~/.bashrc
sudo chmod 777 cuda_9.0.176_384.81_linux.run
sudo ./cuda_9.0.176_384.81_linux.run -toolkit -samples -override --no-opengl-libs -silent
sudo apt install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 #just a 反馈
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 50 #just a 反馈
#打开文件
sudo gedit ~/.bashrc
#在文件结尾处添加
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda/extras/CPUTI/lib64
export CUDA_HOME=/usr/local/cuda-9.0/bin
export PATH=$PATH:$LD_LIBRARY_PATH:$CUDA_HOME
#保存关闭文件后,使之生效
source ~/.bashrc
最好重启一下:
sudo reboot
cd ~/NVIDIA_CUDA-9.0_Samples/1_Utilities/deviceQuery
make -j8 #8线程并行编译
sudo ./deviceQuery
若会输出相应的显卡性能信息,Result = PASS,表明CUDA安装成功。
dj@dj:~/NVIDIA_CUDA-9.0_Samples/1_Utilities/deviceQuery$ sudo ./deviceQuery
[sudo] dj 的密码:
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "Quadro P4000"
CUDA Driver Version / Runtime Version 10.2 / 9.0
CUDA Capability Major/Minor version number: 6.1
Total amount of global memory: 8118 MBytes (8512602112 bytes)
(14) Multiprocessors, (128) CUDA Cores/MP: 1792 CUDA Cores
GPU Max Clock rate: 1480 MHz (1.48 GHz)
Memory Clock rate: 3802 Mhz
Memory Bus Width: 256-bit
L2 Cache Size: 2097152 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 2 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Supports Cooperative Kernel Launch: Yes
Supports MultiDevice Co-op Kernel Launch: Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 179 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.2, CUDA Runtime Version = 9.0, NumDevs = 1
Result = PASS
nvcc -V
出现下图的版本号为安装版本号就表明CUDA安装成功了
dj@dj:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
在安装包所在文件夹,打开终端,输入以下命令:
tar -zxvf cudnn-9.0-linux-x64-v7.tgz
sudo cp cuda/lib64/* /usr/local/cuda-9.0/lib64/
sudo cp cuda/include/* /usr/local/cuda-9.0/include/
命令就是上面三条,挨个执行即可,为了进一步学习和验证,给出解压后信息如下:
dj@dj:~/dingjing/deeplearning$ tar -zxvf cudnn-9.0-linux-x64-v7.5.0.56.tgz
cuda/include/cudnn.h
cuda/NVIDIA_SLA_cuDNN_Support.txt
cuda/lib64/libcudnn.so
cuda/lib64/libcudnn.so.7
cuda/lib64/libcudnn.so.7.5.0
cuda/lib64/libcudnn_static.a
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
显示如下信息即为安装成功:
dj@dj:~/dingjing/deeplearning$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 5
#define CUDNN_PATCHLEVEL 0
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"
pip install -U tensorflow-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple --user
import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
下载pycharm-professional-2017.1.4.tar.gz
安装包:https://www.jetbrains.com/pycharm/download/previous.html
执行解压命令:
sudo tar -xzf pycharm-professional-2017.1.4.tar.gz -C /opt/
进入解压后的bin目录中:
cd /opt/pycharm-2017.1.4/bin
开始安装Pycharm:
sh ./pycharm.sh
弹出一个complete installation对话框,选择Do not import settings,OK。
下面的跟着引导来,激活时在server选项里边输入 http://idea.imsxm.com/
用了一段时间后,需要用同样方法再次激活。
参考
首先,需要添加存储库以在Ubuntu中安装Java。通过在终端中键入以下来添加存储库
sudo add-apt-repository ppa:linuxuprising/java
现在通过键入以下更新包管理器索引。
sudo apt update
键入以下命令安装Java。
sudo apt install openjdk-8-jdk
安装好后,测试是否安装成功:
java -version
输出应如下:
dj@dj:~/dingjing/deeplearning/AS$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
8.2.1 最简单的方法:就是有点耗时
使用 snappy 打包系统在Ubuntu 18.04上安装Android Studio。
要下载并安装Android Studio snap软件包:
sudo snap install android-studio --classic
安装完成后,将看到以下输出:
android-studio 3.3.1.0 from Snapcrafters installed
Copy
Android Studio已安装在您的Ubuntu桌面上。
这种方法就是比较慢,没办法通过迅雷下载安装包,安装包下载过程痛苦。下面介绍一种快速的方法。
8.2.2 另一种不太耗时的安装方法:
先安装android SDK:
sudo apt-get update
sudo apt-get install android-sdk
到官网下载AS安装包android-studio-ide-192.6392135-linux.tar.gz
:
执行解压命令:
sudo tar -xzf android-studio-ide-192.6392135-linux.tar.gz -C /opt/
进入解压后的bin目录中:
cd /opt/android-studio/bin
开始安装Android :
sh ./studio.sh
只需要五个命令就可以完成谷歌chrome浏览器的安装和打开,参考文章
sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.list.d/
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
sudo apt-get install google-chrome-stable
/usr/bin/google-chrome-stable
安装完成后,下载插件,在该链接中,非谷歌浏览器可以选择Download crx file from Crx4Chrome
途径下载。打开Google浏览器的扩展程序界面,将插件拖入即可。
打开终端
cd 模板
sudo gedit 文本文件
打开了一个空白文件窗口,不需要更改直接保存,这样模板中多出了一个文件,右键就有新建文本选项了
参考
首先安装Fcitx框架:
sudo apt install fcitx-bin fcitx-table
然后配置输入法系统:
打开设置中心, 选中 “区域和语言” > 管理已安装的语言 > 键盘输入法系统中选择 “fcitx
” > 应用到整个系统
下载安装包并安装:
去搜狗输入法官网下载对应系统的输入法,我下载的是sogoupinyin_2.3.1.0112_amd64.deb
,双击安装或者sudo dpkg -i ./(你下载的ded包)
sudo dpkg -i sogoupinyin_2.3.1.0112_amd64.deb
如果报错,需要安装相关依赖,依赖安装过程中可能有极少部分报错,把下面的命令运行完,只要最后一条命令不报错就行:
sudo add-apt-repository ppa:fcitx-team/nightly
apt-get update
sudo apt-get upgrade
sudo apt install libopencc1 fcitx-libs fcitx-libs-qt fonts-droid-fallback
sudo apt-get install -f
sudo dpkg -i sogoupinyin_2.3.1.0112_amd64.deb
重启系统使之生效:
sudo reboot
点击屏幕右上角新出现的小键盘的图标,然后配置当前输入法,点击加号,把搜狗输入法添加进去,并移到最顶上,这样搜狗输入法就安装完毕了。
sudo apt install git
sudo apt --fix-broken install #修复
sudo apt install git #修复后再次安装
参考:Ubuntu上的QQ/TIM和微信究极方案
参考:官方网站-星外之神 / deepin-wine-for-ubuntu
下载到本地:
git clone https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu.git
下载完成后切换到文件目录,授予可执行权限,并在终端中运行:
cd deepin-wine-for-ubuntu
chmod +x install.sh
./install.sh
一般情况下,由于网络或服务器原因会出现未成功安装的条目,反复修复并安装,最好趁网络极佳的时候:
sudo apt-get update #修复
./install.sh #重新来一遍,务必确保网好
参考:官方网站-星外之神 / deepin-wine-for-ubuntu
other reference here
other reference here
直接就着当前终端窗口所指向的地址即wine/deepin-wine-for-ubuntu
文件夹,执行下列命令:
wget https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.qq.office/deepin.com.qq.office_2.0.0deepin4_i386.deb
sudo dpkg -i deepin.com.qq.office_2.0.0deepin4_i386.deb
sudo apt-get install -f #LZ未用到这一步,只要前两步不报错就行
wget https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.thunderspeed/deepin.com.thunderspeed_7.10.35.366deepin18_i386.deb
sudo dpkg -i deepin.com.thunderspeed_7.10.35.366deepin18_i386.deb
wget https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.baidu.pan/deepin.com.baidu.pan_5.7.3deepin0_i386.deb
sudo dpkg -i deepin.com.baidu.pan_5.7.3deepin0_i386.deb