Created
July 9, 2020 05:00
-
-
Save chakkritte/b2e6fdb26cf86104c612f7260bedffda to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
# base image docker | |
BASE=ufoym/deepo | |
# name of container | |
NAME=$1 | |
# directory | |
DIR=/home/$(whoami) | |
export UID=$(id -u) | |
export GID=$(id -g) | |
nvidia-docker run --name $NAME -ti \ | |
-e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $DIR:"/home/$USER" \ | |
--user $UID:$GID \ | |
--workdir="/home/$USER" \ | |
--volume="/etc/group:/etc/group:ro" \ | |
--volume="/etc/passwd:/etc/passwd:ro" \ | |
--volume="/etc/shadow:/etc/shadow:ro" \ | |
$BASE bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment