Skip to content

Instantly share code, notes, and snippets.

@tkanmae
Last active May 16, 2017 22:10
Show Gist options
  • Save tkanmae/69378defcfc79bff067d554a81a3d3bf to your computer and use it in GitHub Desktop.
Save tkanmae/69378defcfc79bff067d554a81a3d3bf to your computer and use it in GitHub Desktop.
AWS EC2 g2 Instances setup
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo reboot

NVIDIA Driver

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update -y
sudo apt-get install -y nvidia-367 nvidia-modprobe
sudo apt-get reboot

Docker

sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update -y
sudo apt-get install docker-engine
sudo service docker start
sudo usermod -aG docker ubuntu

nvidia-docker

curl -L -O https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.0-rc.3/nvidia-docker_1.0.0.rc.3-1_amd64.deb
sudo dpkg -i nvidia-docker_1.0.0.rc.3-1_amd64.deb
rm -f nvidia-docker_1.0.0.rc.3-1_amd64.deb
# Test with nvidia-smi
sudo nvidia-docker run --rm nvidia/cuda nvidia-smi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment