Skip to content

Instantly share code, notes, and snippets.

Created July 9, 2014 21:17
What would you like to do?
OpenCL on GPU instance
# This script installs everything you need on an EC2 GPU Instance
# Create an Ubuntu 12.04 GPU Instance with at least 16GB of free space
# Base packages
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install gcc git cmake
# CUDA/Nvidia installations
sudo dpkg -i cuda-repo-ubuntu1204_6.0-37_amd64.deb
sudo apt-get update
sudo apt-get install cuda
sudo apt-get install locate
sudo updatedb
export PATH=/usr/local/cuda-6.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-6.0/lib64:$LD_LIBRARY_PATH
mkdir CUDA
cd CUDA .
cd NVIDIA_CUDA-6.0_Samples/1_Utilities/deviceQuery
cd ~/CUDA
# Python OpenCL
sudo apt-get install opencl-headers python-pip python-dev python-numpy python-mako libboost-python-dev
sudo pip install PyOpenGL PyOpenGL_accelerate --upgrade
git clone
cd pyopencl
sudo python --cl-enable-gl
sudo find /usr/local/cuda-6.0/lib64/ -type f -exec cp {} /usr/lib \;
sudo ldconfig -v
sudo python build
sudo python install
# X Server
sudo apt-get install xorg openbox libglew-dev mesa-utils python-xdg
cd /etc/X11
sudo wget
sudo xinit &
cd ~/CUDA
sudo nvidia-xconfig
cd ~/CUDA
# OpenCL
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev libglib2.0-dev
sudo apt-get install libgtkglext1
sudo apt-get install libgtkglext1-dev
sudo apt-get build-dep ffmpeg
sudo apt-get install ffmpeg
sudo apt-get build-dep vlc
sudo apt-get install vlc
git clone
cd opencv
git checkout 2.4.9.x-prep
mkdir build
cd build
sudo make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment