1. 进入base 镜像对应的容器:
1.1 docker run -it --gpus all -v /home/huangxiujie:/home/huangxiujie iregistry.baidu-int.com/huangxiujie/tsai_reversing:paddlecloud-v2.3.0-gcc820-cuda11.0_cudnn8-nccl2.12.10 /bin/bash
1.2. docker 挂载本地目录
docker run -it -v /home/dock/Downloads:/usr/Downloads ubuntu64 /bin/bash
1.3 . 如果docker 不识别显卡
curl https://get.docker.com | shsudo systemctl start docker && sudo systemctl enable docker
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
curl -s -L https://nvidia.github.io/nvidia-container-runtime/experimental/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get updatesudo apt-get install -y nvidia-docker
sudo systemctl restart docker
2. 下载需要的cuda版本,CUDA Toolkit Archive | NVIDIA Developer
CUDA的正确安装/升级/重装/使用方式 - 知乎
参考上述文档安装
3. 容器导出镜像
Docker 容器导出为镜像_保存容器为镜像-CSDN博客