You must first install docker
Official documents cited here: https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 pub rsa4096 2017-02-22 [SCEA] 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid [ unknown] Docker Release (CE deb) <[email protected]> sub rsa4096 2017-02-22 [S]
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
Then go dockerhub pull a deep learning Docker
sudo Docker pull tensorflow / tensorflow: Latest-GPU-Py3
进入docker中的bash,并安装自己需要的包
tensorflow / tensorflow: latest-gpu- py3 / bin / bash
sudo docker run -t -i
save docker mirror installed after the
first use docker ps find the current image
stored in the current snapshot using a docker commit
docker commit -p 2ee1554a50de ubuntu-backup ( ubuntu-backup name easily compile
now on setting up the environment, how to run the program it
sudo Docker rUN -p 5000: Host 5000 -it --ipc = -v / Home / Bing / WorkSpace / DeepPink ++: / Workspace tensorflow / tensorflow: Latest-GPU-Py3 / bin / bash
red represents this directory on the workspace directory under docker