Skip to content

Instantly share code, notes, and snippets.

View dopplesoldner's full-sized avatar

Mohammad Rashid dopplesoldner

View GitHub Profile
#!/bin/sh
sudo apt-get -y update
# Install nvidia drivers
sudo apt-get install -y ubuntu-drivers-common
sudo ubuntu-drivers devices
sudo apt-get -y install $(sudo ubuntu-drivers devices | grep "driver" | grep "recommended" | grep -o '\bnvidia-\w*')
sudo apt-get -y install nvidia-modprobe
#Set up docker repository
sudo apt-get install -y --no-install-recommends \
apt-transport-https \
@dopplesoldner
dopplesoldner / autodeploy.json
Last active May 5, 2017 10:51
Kubernetes GPU autodeploy file
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dnsNamePrefix": {
"type": "string",
"metadata": {
"description": "Sets the Domain name prefix for the cluster. The concatenation of the domain name and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address."
}
},
@dopplesoldner
dopplesoldner / install_cuda.sh
Last active January 18, 2017 14:49
Install cuda
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y opencl-headers build-essential protobuf-compiler \
libprotoc-dev libboost-all-dev libleveldb-dev hdf5-tools libhdf5-serial-dev \
libopencv-core-dev libopencv-highgui-dev libsnappy-dev libsnappy1 \
libatlas-base-dev cmake libstdc++6-4.8-dbg libgoogle-glog0 libgoogle-glog-dev \
libgflags-dev liblmdb-dev git python-pip gfortran
@dopplesoldner
dopplesoldner / update_gitignore.sh
Created September 21, 2015 13:39
updating gitignore
git rm -r --cached .
git add .
mkdir -p ~/.vim/after/plugin
ln -s ~/.vim/bundle/ultisnips/after/plugin/* ~/.vim/after/plugin
mkdir ~/.vim/ftdetect
ln -s ~/.vim/bundle/ultisnips/ftdetect/* ~/.vim/ftdetect
@dopplesoldner
dopplesoldner / Serializer.cs
Created July 7, 2014 11:50
serializers in c#
public static class Serializer
{
public static byte[] Serialize<T>(T obj)
{
var serializer = new DataContractSerializer(typeof(T));
var stream = new MemoryStream();
using (var writer =
XmlDictionaryWriter.CreateBinaryWriter(stream))
{
serializer.WriteObject(writer, obj);
# Get latest Sun Java SDK in v6 from Oracle
wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64-rpm.bin
# make it exec
chmod +x jdk-6u31-linux-x64-rpm.bin
# Install Java
sudo ./jdk-6u31-linux-x64-rpm.bin
# Check if the default java version is set to sun jdk
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java