packer-nvidia-docker
packer template to build Ubuntu Server AMI (Amazon Machine Image) includes nvidia-docker and NVIDIA graphics driver in Personal Package Archives for Proprietary GPU Drivers.
Requirements
Building Images
To build images, simply run:
$ git clone https://github.com/uchida/packer-nvidia-docker
$ cd packer-nvidia-docker
$ export AWS_ACCESS_KEY_ID=xxx
$ export AWS_SECRET_KEY_ID=xxx
$ packer build template.json
About nvidia-docker, see nvidia-docker repository wiki
Build configuration
To save cost, this build AMI with t2.nano
instance
and you could launch it with GPU instances, such as g2.2xlarge
, g2.8xlarge
.
Default this build AMI in ap-northeast-1
region,
to build AMI on other region, change "region"
and "source_ami"
with packer's
-var/-var-file
options
or directly edit them in template.json
.
Example usage for nvidia-docker
Use tensorflow
$ sudo nvidia-docker run -it -p 8888:8888 tensorflow/tensorflow:latest-gpu
Use chainer
$ sudo nvidia-docker run -it chainer/chainer /bin/bash
if you want to run nvidia-docker without sudo
, run
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
see Post-installation steps for Linux for detail.
License
Contents in this repository are dedicated to
[]
(https://creativecommons.org/publicdomain/zero/1.0/).
No rights reserved.
License for built AMI follows ones of Ubuntu project, nvidia-docker and NVIDIA software license for NVIDIA graphics driver.