Skip to content

AWS GPU Resources

Sean McDaniel edited this page Jan 2, 2020 · 10 revisions

Supporting GPU computation with SABER (and docker more generally) requires some additional configuration to make sure the correct GPU libraries and environment variables are available. This page documents how to set up an EC2 instance to work with SABER and GPUs.

  1. Create a new EC2 Ubuntu instance with the Deep Learning AMI (Ubuntu)
  2. Connect to your instance (ssh with the user 'Ubuntu', the IP address from AWS, and the PEM certificate you generated during step 1).
  3. sudo apt-get update && sudo apt-get upgrade
  4. Ensure docker is installed successfully (which docker) if not, go here: https://docs.docker.com/install/linux/docker-ce/ubuntu/.
  5. Check to see if NVIDIA drivers are present run which nvcc if not run sudo apt-get install -y cuda-9-1 nvidia-cuda-toolkit
  6. Make the default docker runtime NVIDIA (required by CWL unfortunately) by editing /etc/docker/daemon.json with
{
    "default-runtime": "nvidia",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}
  1. Restart
  2. Test that this is working using docker run --runtime=nvidia --rm nvidia/cuda:7.5-devel nvidia-smi
  3. Test your container! An example of a Theano/Keras container can be found in saber/xbrain/unets