docker build -f filename.Dockerfile -t ${repository_name}:${tag} .
使用镜像文件生成docker contanierdocker run -it --gpus all --privileged=true --userns=host --shm-size=8g --name ${contanier_name} -e NVIDIA_DRIVER_CAPABILITIES=compute,utility -v out_dir:in_dir ${repository_name}:${tag} /bin/bash
开启docker contanierdocker exec -it ${contanier_name} /bin/bash
docker contanier导出为tar文件docker export -o ${tar_name}.tar ${contanier_name}
tar文件导入为镜像文件docker import ${tar_name}.tar ${repository_name}:${tag}