Skip to content

Instantly share code, notes, and snippets.

View hsaputra's full-sized avatar

Henry Saputra hsaputra

View GitHub Profile
@hsaputra
hsaputra / gist:0bb3f2727d8e679f3f7c2ce4677a4425
Created September 22, 2017 17:26
PR for example of K8S Device Plugin
RedHat for Solarflare (a NIC)
https://github.com/vikaschoudhary16/kubernetes/pull/7
@hsaputra
hsaputra / gist:63d88545c4055c8375bf432e67ef0b72
Created September 21, 2017 19:20
Build Kubernetes from source
https://www.sebastien-han.fr/blog/2015/07/01/build-kubernetes-from-source/
https://kubernetes-v1-4.github.io/docs/getting-started-guides/locally/
@hsaputra
hsaputra / gist:21049405a273bb04e964f83250ea9b28
Last active September 20, 2017 17:08
Kubernetes Device Plugin and Resource links
https://github.com/kubernetes/community/blob/58b1c30d95719749068497ba35dfe4c64b21aa72/contributors/design-proposals/resource-management/device-plugin.md
https://github.com/kubernetes/community/pull/844
https://github.com/kubernetes/kubernetes/pulls?utf8=%E2%9C%93&q=is%3Apr%20is%3Aclosed%20device%20plugin
Multiple GPUs:
https://github.com/kubernetes/kubernetes/pull/42116
Kubernetes local deployment
https://www.sebastien-han.fr/blog/2015/07/01/build-kubernetes-from-source/
@hsaputra
hsaputra / gist:ef096819df433834b28da8cbd3beded3
Created September 14, 2017 23:14
GPU NVIDIA remove nouveau driver
remove all nvidia packages ,skip this if your system is fresh installed
sudo apt-get remove nvidia* && sudo apt autoremove
install some packages for build kernel:
sudo apt-get install dkms build-essential linux-headers-generic
now block and disable nouveau kernel driver:
sudo vim /etc/modprobe.d/blacklist.conf
Insert follow lines to the blacklist.conf:
hsaputra@hsaputra-desktop:/etc/resolvconf/resolv.conf.d$ ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:24:8b:fb:2a
inet addr:172.18.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eno1 Link encap:Ethernet HWaddr d0:17:c2:ad:2c:8f
@hsaputra
hsaputra / gist:8f874f3e822027a4ff81a6df3dc5ab17
Last active April 20, 2017 02:09
Replace String in git
git grep -lz '0.2.0-SNAPSHOT' | xargs -0 perl -i'' -pE "s/0.2.0-SNAPSHOT/0.3.0-SNAPSHOT/g"
perl -pi -e 's/foo/bar/g' file.txt
You can ssh into the VM by finding the IP (from kubectl config view) and using username "docker" password "tcuser":
ssh [email protected]
@hsaputra
hsaputra / Bash profile to bashrc
Created July 14, 2016 21:48
bash_profile to redirect to bashrc
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
@hsaputra
hsaputra / gist:eb513675a04ed7ec3fe156c18be400bc
Created April 15, 2016 06:32
BIDMat copy to fix compile with CUDA 7.5 in BIDMach
~/devel/BIDMach$ cp ../BIDMat/lib/libbidmatc libbidmatcpu-linux-x86_64.so libbidmatcuda-linux-x86_64.so
~/devel/BIDMach$ cp ../BIDMat/lib/libbidmatc* lib/