Ubuntu 18.04安装docker踩坑记录 (根据docker官网) 1.Update the apt package index: $ sudo apt-get update 2.Install packages to allow apt to use a repository over HTTPS: $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common 3. Add Docker’s o cial GPG key: $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - [注]:这里要是不OK的话,就用手机开热点,就显示OK。 Verify that you now have the key with the ngerprint: $ 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) <docker@docker.com> sub rsa4096 2017-02-22 [S] 4.Use the following command to set up the stable repository: $ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" [注]: 若在以上的第3步或第4步出现docker官方源安装不上的情况,W:Failed to fetch https://apt.dockerproject.org/repo/dists/ubun 则, $sudo gedit /etc/apt/sources.list 将docker官方源删掉,换作阿里源,并: $curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - $sudo add-apt-repository \ "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \ $(lsb_release -cs \ stable)" 若不修改以上三步,则每次apt update就会报错: Failed to fetch https://apt.dockerproject.org/repo/dists/ubun 5.Update the apt package index: $ sudo apt-get update [注]:这里如果一直很慢的话,换手机开热点就好了 6.Install the latest version of Docker CE, or go to the next step to install a specic version: $ sudo apt-get install docker-ce [注]:这里要是出现: update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode docker.service is a disabled or a static unit, not starting it. 则很有可能运行下一步的时候报错,若不出现这两行就没关系。 7.Verify that Docker CE is installed correctly by running the hello-world image: $ sudo docker run hello-world 这里若是出现: Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.</
Ubuntu 18.04+docker+nvidia-docker+deepo安装及踩坑记录
最新推荐文章于 2024-08-13 01:57:53 发布
本文详细记录了在Ubuntu 18.04上安装Docker、NVIDIA-Docker以及Deepo的过程,包括可能遇到的问题和解决方法。首先通过$sudo apt-get install nvidia-docker2安装NVIDIA-Docker,然后运行$nvidia-smi检查显卡驱动。如果遇到错误,尝试指定CUDA版本解决。接着,安装Deepo,通过$docker pull命令从Docker Hub获取镜像,可以使用国内镜像源加速下载。最后,成功运行Deepo验证安装完成。
摘要由CSDN通过智能技术生成