Docker commands

check existed images

$ docker images

rename images

$ docker tag IMAGE ID(d583c3ac45fd) new_name:TAG

delete images

$ docker ps –a # check container information
$ docker rm container ID
$ docker rmi image ID

exit container

Exit or


pull Caffe from the internet

$ docker pull bvlc/caffe:gpu

test if Caffe works

$ nvidia-docker run -it -p 8888:8888 -v /home/liuzhisong/Docker_Zhisong/caffe_test:/workspace/examples/caffe_test -v /home/data1/SR:/workspace/data/SR caffe_18.01_opencv3.4.0:latest
nvidia-docker run -it --name [container_name] -p 8888:8888 -v ~/Data:/Data [image_name]
jupyter notebook --ip= --port=8888 --allow-root &

exit container


or exit

stop container to the backstage


restart container

$ docker start container_ID
$ docker attach container_ID

copy files

sorce destination

cp –rf /home/data1/SR/xxx /home/liuzhisong/data/xxx

replace files

sorce destination

cp –rf /home/data1/SR/xxx/. /home/liuzhisong/data/xxx
nvidia-docker run -it -p 8890:8890 -v /home/liuzhisong/Docker_Zhisong/TF_test:/workspace/examples
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

Leave a Reply

Your email address will not be published. Required fields are marked *