Created
March 17, 2023 07:00
-
-
Save knwng/8313ef87bfc9c39ff9b24df798cfe106 to your computer and use it in GitHub Desktop.
Run Docker with GPU loaded and necessary permissions for debug
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/bash | |
set -euxo pipefail | |
IMAGE='' | |
NAME='' | |
docker run -dt \ | |
--shm-size=32gb \ | |
--gpus=all \ | |
--privileged \ | |
--restart=always \ | |
--hostname="${NAME}" \ | |
--cap-add=SYS_ADMIN \ | |
--cap-add=SYS_PTRACE \ | |
--security-opt seccomp=unconfined \ | |
--name "${NAME}" \ | |
"${IMAGE}" \ | |
/bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment