docker run
docker run --gpus all -it -p 8888:8888 -v /home/peng/Downloads:/tf/Downloads --rm tensorflow/tensorflow:1.14.0-gpu-py3-jupyter
–gpus all 带gpu
-p 8888:8888 左边是外部端口,右边是docker镜像端口。
-v 表示挂载本机/home/dock/Downloads到容器的/usr/Downloads
-rm 表示对容器内的操作不会保存,通常用于测试
docker save
docker save tensorflow/tensorflow:latest-gpu-jupyter > tensorflow-tensorflow:latest-gpu-jupyter
ls -sh tensorflow-tensorflow:latest-gpu-jupyter
docker load
docker load < albertmiao-tensorflow:1.14.0-gpu-py3-jupyter.tar
docker commit
docker commit e34eac8395e3 albertmiao/tensorflow:1.14.0-py3-jupyter
docker push
docker push albertmiao/tensorflow:1.14.0-py3-jupyter
其他
查看GPU状态:开一个终端查看显卡利用率,每秒刷新
watch -n 1 nvidia-smi