#!/bin/sh set -e cd $(dirname "$0")/.. # detect if user is on new version of nvidia-docker and run the appropriate command if docker run --gpus all nvidia/cuda:9.0-base nvidia-smi 2>/dev/null; then docker run --gpus all -it --net=host -v $(pwd):/home/dev csnet:gpu bash else docker run --runtime=nvidia -it --net=host -v $(pwd):/home/dev csnet:gpu bash fi