Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| from tensorflow.python.client import device_lib | |
| def get_available_gpus(): | |
| local_device_protos = device_lib.list_local_devices() | |
| return [x.name for x in local_device_protos if x.device_type == 'GPU'] | |
| get_available_gpus() |
| wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
| dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
| apt-get update | |
| apt-get install cuda-nvrtc-8-0 cuda-nvgraph-8-0 cuda-cusolver-8-0 cuda-cublas-8-0 cuda-cufft-8-0 cuda-curand-8-0 cuda-cusparse-8-0 cuda-npp-8-0 cuda-cudart-8-0 cuda-drivers | |
| nvidia-smi | |
| sudo rmmod nvidia_drm | |
| sudo rmmod nvidia_modeset | |
| sudo rmmod nvidia_uvm | |
| sudo rmmod nvidia | |
| nvidia-smi |
| #!/bin/bash | |
| # install CUDA Toolkit v8.0 | |
| # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
| CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
| wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
| sudo dpkg -i ${CUDA_REPO_PKG} | |
| sudo apt-get update | |
| sudo apt-get -y install cuda |
| ################################################################################################## | |
| # experiments service | |
| ################################################################################################## | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| service: ambassador | |
| name: ambassador | |
| annotations: |
| https://www.dataquest.io/blog/basic-statistics-with-python-descriptive-statistics/ | |
| https://blogs.oracle.com/ai/types-of-machine-learning-and-top-10-algorithms-everyone-should-know | |
| https://www.kdnuggets.com/2018/05/5-reasons-logistic-regression-first-data-scientist.html | |
| https://www.kdnuggets.com/2018/02/logistic-regression-concise-technical-overview.html | |
| https://towardsdatascience.com/types-of-machine-learning-algorithms-you-should-know-953a08248861 | |
| https://machinelearningmastery.com/a-gentle-introduction-to-the-central-limit-theorem-for-machine-learning/ |
| # Add this snippet to the top of your playbook. | |
| # It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
| # gwillem@gmail.com | |
| - hosts: all | |
| gather_facts: False | |
| tasks: | |
| - name: install python 2 | |
| raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| // Found at https://play.golang.org/p/pQn_doizkn_L | |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| var strs = make(map[reflect.Type]map[int]string) |
| sudo vi /etc/sysctl.conf | |
| # Add the following to sysctl.conf: | |
| # Decrease TIME_WAIT seconds | |
| net.ipv4.tcp_fin_timeout = 30 | |
| # Recycle and Reuse TIME_WAIT sockets faster | |
| net.ipv4.tcp_tw_recycle = 1 |