-
Notifications
You must be signed in to change notification settings - Fork 9
AWS EC2 ML instance setup
Scott Came edited this page Jun 24, 2018
·
13 revisions
Based loosely on: https://github.com/NVIDIA/nvidia-docker (docker setup)
After launching a p2.xlarge instance...
Original instructions: https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo groupadd docker
sudo usermod -aG docker $USER
Test: $ docker run hello-world
Original instructions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html#obtain-nvidia-driver-linux
sudo apt-get upgrade -y linux-aws
sudo reboot
(wait for reboot)
sudo apt-get install -y gcc make linux-headers-$(uname -r)
cd /tmp
curl -O http://us.download.nvidia.com/tesla/384.145/NVIDIA-Linux-x86_64-384.145.run
sudo /bin/sh ./NVIDIA-Linux-x86_64-384.145.run
rm NVIDIA-Linux-x86_64-384.145.run
sudo apt-get remove --purge -y gcc make linux-headers-$(uname -r)
sudo apt-get autoremove -y
sudo apt-get autoclean -y
sudo reboot
(wait for reboot)
Test driver install: $ nvidia-smi
Original instructions: https://github.com/NVIDIA/nvidia-docker
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
Test: sudo nvidia-container-cli --load-kmods info
And: docker run --rm --runtime=nvidia -ti nvidia/cuda