Created
August 27, 2019 22:06
-
-
Save tmbdev/9b8a99d224087fc18a1698d0da601884 to your computer and use it in GitHub Desktop.
run docker image as yourself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| image="$1" | |
| shift | |
| docker run \ | |
| --runtime=${runtime:-nvidia} \ | |
| --network host \ | |
| -v /etc/passwd:/etc/passwd \ | |
| -v /etc/group:/etc/group \ | |
| -v $HOME:$HOME \ | |
| -v `pwd`:`pwd` \ | |
| ${opts:-${DR_OPTS}} \ | |
| -w `pwd` \ | |
| -u $(id -u):$(id -g) \ | |
| -i \ | |
| -t "$image" \ | |
| "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment