nvidia-docker 的使用
程序员文章站
2024-02-27 14:37:27
...
nvidia-docker run -it --shm-size=10g --runtime=nvidia -e NVIDIA_VISI
BLE_DEVICE=0 nvcr.io/nvidia/tensorflow:20.03-tf2-py3
nvidia-docker run -it --shm-size=10g --runtime=nvidia -e N
VIDIA_VISIBLE_DEVICE=0 nvcr.io/nvidia/tensorflow:20.06-tf2-py3
查看docker的name
sudo nvidia-docker ps
将宿主机的内容拷贝到docker中
sudo nvidia-docker cp xxx exciting_yalow:/xxx
拷贝数据
sudo nvidia-docker cp /media/xxx exciting_yalow:/xxx
保存docker
sudo nvidia-docker run -it --shm-size=10g --runtime=nvidia -e NVIDIA
_VISIBLE_DEVICE=0 nvcr.io/nvidia/tensorflow:20.03-tf2-py3
sudo nvidia-docker ps # 通过該命令查看CONTAINER ID
sudo nvidia-docker commit containerID 镜像名字(alvatest)
sudo nvidia-docker images # 查看镜像名字对应的ID
sudo nvidia-docker save 镜像ID -o xxx.tar
sudo nvidia-docker load -i xxx.tar # 将压缩包加载为镜像
sudo nvidia-docker images # 查看镜像是否成功,同时查看镜像ID
sudo nvidia-docker run -it 镜像ID
sudo nvidia-docker images # 查看镜像名字对应的ID
sudo nvidia-docker rmi -f 镜像ID(ddb9b1457f2d) #通过镜像ID删除镜像