拉取镜像:
sudo docker pull reg.xxx/xxx:versionx
启动脚本:
container_name="xxx"
container_port="2023"
container_mnt="-v /local/path:/mnt/path"
container_version="versionx"
sudo docker run --name=${container_name} -it -d \
--privileged --shm-size="80g" \
-p 8421:8421 \
--network="host" \
--cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
--gpus all \
--publish ${container_port}:22 \
${container_mnt} \
reg.xxx/xxx:${container_version} bash
echo "sudo docker exec -it ${container_name} bash"
To start an existing container (not running), use:
sudo docker start ${container_name}