In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Why would you do this? | |
# Well, perhaps you have a VPN to A, and A can access B but you can't access B directly. | |
# Assuming a and b are hosts in the domain example.com. Add the below to ~/.ssh/config on | |
# your local machine. | |
Host b.example.com | |
ProxyCommand ssh -q a.example.com nc -q0 b.example.com 22 | |
# If you have another host that only b can access, you can also chain through that! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# Installation script for Cuda and drivers on Ubuntu 14.04, by Roelof Pieters (@graphific) | |
# BSD License | |
if [ "$(whoami)" == "root" ]; then | |
echo "running as root, please run as user you want to have stuff installed as" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# Test script for checking if Cuda and Drivers correctly installed on Ubuntu 14.04, by Roelof Pieters (@graphific) | |
# BSD License | |
if [ "$(whoami)" == "root" ]; then | |
echo "running as root, please run as user you want to have stuff installed as" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Installation script for Deep Learning Libraries on Ubuntu 14.04, by Roelof Pieters (@graphific) | |
# BSD License | |
orig_executor="$(whoami)" | |
if [ "$(whoami)" == "root" ]; then | |
echo "running as root, please run as user you want to have stuff installed as" | |
exit 1 | |
fi | |
################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A script to run on a Windows 7 host after installing the Access redistributable: | |
http://www.microsoft.com/en-nz/download/details.aspx?id=13255 | |
Install Python 2.7, and then pyodbc from: | |
http://code.google.com/p/pyodbc/ | |
The script dumps all tables to a dictionary and pickles it. The dictionary has a key for each table name, each value is a dictionary that has the following keys. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Assume spreadsheets is a django pagination object and pages is an iterable of page numbers to display --> | |
<!-- Note: this doesn't preserve GET parameters or hash fragments --> | |
<div class="pagination"> | |
<ul> | |
{% if spreadsheets.has_previous %} | |
<li><a href="?page={{ spreadsheets.previous_page_number }}">«</a></li> | |
{% else %} | |
<li class="disabled"><a href="?page={{ spreadsheets.previous_page_number }}">«</a></li> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# gpu_stat.py [DELAY [COUNT]] | |
# dump gpu stats as a line of json | |
# {"time": 1474168378.146957, "pci_tx": 146000, "pci_rx": 1508000, | |
# "gpu_util": 42, "mem_util": 24, "mem_used": 11710, | |
# "temp": 76, "fan_speed": 44 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
resolve_path() { | |
# From https://github.com/keen99/shell-functions/tree/master/resolve_path | |
#I'm bash only, please! | |
# usage: resolve_path <a file or directory> | |
# follows symlinks and relative paths, returns a full real path | |
# | |
local owd="$PWD" | |
#echo "$FUNCNAME for $1" >&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Destination must exist as empty repo on github | |
GIT_REPO="git@github.com:opencog/opencog.git" | |
TEMP_PATH=~/src/opencog_bzr_to_git | |
echo "Using $TEMP_PATH as working dir" | |
BRANCHES=(trunk UnityEmbodiment) | |
mkdir -p ${TEMP_PATH} | |
cd ${TEMP_PATH} |