1. Switch to Nvidia driver in Additional driver tab and reboot
nvidia-smi and you should see driver version is 390
2. Install CUDA using package from Ubuntu, NOT from Nvidia
sudo apt install nvidia-cuda-toolkit
3. Install cuDNN, you need to register a Nvidia developer account, download cuDNN v7.1.2 Library for Linux, use the tarball instead of the ‘official’ deb. Update
LD_LIBRARY_PATH so the
libcudnn.so file can be found. You need to open a new terminal so the
export can work
tar -zxvf cudnn-9.1-linux-x64-v7.1.tgz
mv cuda ~/cuda
# add the following line to your ~/.bashrc or ~/.zshrc
4. Install Anaconda, if you want to use builtin python distribution, just skip this step, Anaconda ships with a lot of packages. …
DO NOT use the package from NVIDIA (they are for Ubuntu 17.04).
If you install it,
Failed to initialize NVML: Driver/library version mismatch. Reboot, you will get stuck with a black screen and some green words flashing.
Solution: Upgrade the OS to 18.04 and use package from Ubuntu, older version only have CUDA 8 https://packages.ubuntu.com/bionic/devel/nvidia-cuda-toolkit
This blog is written for fellow students at dongyueweb, so its targeted readers are people who have taken database class and want to know about time series database (TSDB).
Table of content
Time series database (TSDB) is relative new compared with RDBMS, NoSQL, even NewSQL. However it is becoming trending with the growth of system monitoring and internet of things. The wiki definition of time series data is a series of data points indexed (or listed or graphed) in time order. When it comes to TSDB, I prefer my own definition: store client history in server for analysis. Time series data is history, it’s immutable, unique and sortable. For instance,
the CPU usage at 2017-09-03-21:24:44 is 10.02% for machine-01 in us-east region, it won’t change overtime like bank account balance, there will be no update once it’s generated, the CPU usage at next second, or from different machine are different data points. And the order of data arriving at server does not effect correctness because you can remove the duplicate and sort by client timestamp. Clients of TSDB send their history to sever and is still functional when the server is down, sending data to TSDB is not critical for many clients; A http server’s main job is serving content instead of reporting status code to TSDB. However, RDBMS is treated as single source of truth and effect client’s critical decision making. This lead to very different read and write pattern. For instance, banking application need to query database for user’s balance before proceed by reading and updating a single record. But most TSDB clients are either write only (collectors) or read only (dashboard and alerting system). …
The official download page only have package for 16.04 and 14.04, but actually Ubuntu 17.04 can install CUDA via apt directly. https://launchpad.net/ubuntu/zesty/+source/nvidia-cuda-toolkit
Assume you already have NVIDIA graphic driver installed and just need CUDA. Only the following command is needed.
sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit nvidia-nsight
NOTE: Ubuntu 17.04 use GCC6, which is not supported by
nvcc , the package will install clang-3.8 (the default clang version for 17.04 is clang 4.0, they can co-exist).
Compile cuda code using
nvcc -ccbin clang-3.8 hello-world.cu …
sudo apt-get install python3-pipotherwise you will have error http://stackoverflow.com/questions/18363022/importerror-no-module-named-pip
Wechat does not have official Linux support, though there are some based on electron . You may still want to use the official windows one. One way is to install a Windows VM if you have enough hardware resource.
The step is as following
Update: now docker has community and enterprise edition, install the community edition can be found on docker store . But if you just want to download the deb file, the link in doc is broken, the following should work https://download.docker.com/linux/ubuntu/dists/yakkety/pool/stable/amd64/ as found in this issue.
16.04 has official support, while 16.10 need a lot tweak
The install instruction on docker’s official doc is very long, it used to guide you to the one command install script
curl -sSL https://get.docker.com/ | sudo sh
Extra work is needed if you are using older Ubuntu distribution like 12.04
If you use the script, for 16.10 you will have
E:Unable to locate package…
When using IDEA (including PhpStorm, Clion etc.) I saw the warning for inotify is too low. Result in files are not updated in IDEA when I edit them in other editor like VSCode and Atom, while editing file in IDEA will have instant change in VSCode if that file does not have unsaved change in VSCode.
The official solution is the following link https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit which suggest the following code
sudo sysctl -w fs.inotify.max_user_watches=524288
It works, BUT after reboot, it goes back to the old small number. I also tried something similar from a wiki, which does not work either https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
Finally, by editing the
/etc/sysctl.conf and adding the
fs.inotify.max_user_watches=524288 it works.
sudo echo “fs.inotify.max_user_watches=524288” >> /etc/sysctl.conf should also work if you don’t want to open the file and edit it.
It has been a while since I got my desktop PC, I was using a wired network for it until I have to move to other room this weekend. (The router is in the living room) So I need to use my dusted USB wireless adapter. I tried it when I just got my desktop, but due to secure boot, it can not be installed. Since I already have it disabled for the sake of using VirtualBox, I decided to try it again.