Skip to main content

Installing NVIDIA CUDA on an Amazon Web Services (AWS) machine (Ubuntu 14.04)

Disclaimer: I wrote this post several months ago and did not publish it for unknown reason, I assume that the information below is still relevant and correct.

While trying to install the machine, I started my research by reading Traun Leyden's great blog post: http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/ (you should too)

Amazon offers two types of machines that includes GPUs (https://aws.amazon.com/ec2/instance-types/#g2)
High-performance NVIDIA GPUs, each with 1,536 CUDA cores and 4GB of video memory
While writing this post, I used the g2.2xlarge machine, but you can also use the 8xlarge.

This will be quick and simple:

1. Make sure you are fully up-to-date
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
 When prompted, choose the "install maintainer package...."

2. Reboot the machine (so it will load the new kernel)
3. Install the kernel's header files
sudo apt-get install -y linux-image-extra-virtual linux-headers-`uname -r`
3. Configure the xorg-edgers PPA

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
4. Install the NVIDIA's CUDA repository package
OUTPUT_PATH=/tmp/cuda.deb
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb -O ${OUTPUT_PATH}
dpkg -i ${OUTPUT_PATH}

 5. Update the package manager and install CUDA
sudo apt-get update
sudo apt-get install cuda
6. Make sure everything is installed as expected:
sudo nvidia-smi -a

7. You can also compile and run a sample to make sure everything is ready:
cd /usr/local/cuda/samples/1_Utilities/deviceQuery
make
./deviceQuery

That's all!


- Tal Kain

Comments

  1. Well, pretty well... thanks for the detailed explanation, for NVIDIA GK104 everything works fine, the only one for NVidia drivers download for Windows http://bitdrivers.com/manufacturers/nvidia (64Х) since the previous ones are outdated and weren't connecting with my OS/

    ReplyDelete

Post a Comment

Popular posts from this blog

BinDiff error: "Can't start disassembler. Please set correct path in the main settings first"

After installing  BinDiff  and running the application for the first time on my Windows 7 x64 machine, I tried comparing two different binaries but got an error in the middle of the process: Can't start disassembler. Please set correct path in the main settings first The solution for this error is very simple: While installing BinDiff, the installation process asks for the installation path of IDA. The default path (on x64 machine) would be C:\Program Files (x86)\IDA\. This is not always correct. At my case the installation was at C:\Program Files (x86)\IDA 6.3\. Moving the path inside BinDiff will not be sufficient since part of BinDiff's files are still on the old directory. Easiest way to fix it (or by doing it in advance): Uninstall BinDiff and install it while pointing to the correct IDA's path. -Tal

Ubuntu: Installing a missing ath3k firmware

While trying to prepare a new Ubuntu box to use a new card based on the Atheros chipset, I encounter the following error: Bluetooth: Firmware file "ath3k-1.fw" not found According to  http://wireless.kernel.org/en/users/Drivers/ath3k : ath3k is the Linux Bluetooth driver for Atheros AR3011/AR3012 Bluetooth chipsets. I saw this blog post: http://hexwave.blogspot.com/2011/04/debian-6-with-atheros-3011-ath3k-usb.html So I decided to try installing the package linux-firmware which contains the relevant file (I used  dlocate  to $ dlocate linux-firmware | grep -i ath3 linux-firmware: /lib/firmware/ath3k-1.fw or you can find it by searching for ath3k: $ dlocate ath3k-1.fw linux-firmware: /lib/firmware/ath3k-1.fw I just ran: # apt-get install linux-firmware and it fixed it by installing the missing firmware file. Good luck! Tal Kain

Compiling lsof for iOS device on Mac OSX

I started making a small research on my jailbroken iOS device and I was wondering which files does a specific process touches while I was using it. In order to do so, I wanted to use the famous lsof , so I downloaded the package from saurik's packages using Cydia, only to find out that the given lsof is not working on my device: lsof: PID 40 information error: Cannot allocate memory lsof: PID 39 information error: Cannot allocate memory lsof: PID 38 information error: Cannot allocate memory lsof: PID 37 information error: Cannot allocate memory lsof: PID 36 information error: Cannot allocate memory lsof: PID 35 information error: Cannot allocate memory lsof: PID 33 information error: Cannot allocate memory lsof: PID 31 information error: Cannot allocate memory After trying to figure it out, I decided that it would be the best to just try compiling my own lsof and use it on the device (I also liked the challenge :-) ) So my journey begins with downloading lsof from Apple'