docker容器安装TensorFlow_gpu 版本遇到的坑。。。
作者:互联网
运行并挂载docker镜像
docker run -it -v E:/workspace/docker:/dl -p 8888:8888 8d78dd1e1b64 /bin/bash
安装jupyter
保存docker容器的修改
查看被修改的容器 :
docker ps -l
提交指定容器保存为新的镜像:docker commit <container id> <new image name>
查看本地所有镜像:docker images
docker commit 58a7ed5b tensorflow_gpu_jupyter
进入后台运行的容器的命令行而不创建新的容器,只需要输入以下命令:
#exec是进入已经存在的容器,run是创建新容器
docker exec -it 58a7ed5bc183 /bin/bash
docker中安装英伟达显卡驱动报错:
报错信息:
W: GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64 Release: The following signatures were invalid: BADSIG F60F4B3D7FA2AF80 cudatools <cudatools@nvidia.com>
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Release' is not signed.
在在Dockerfile中添加:
RUN echo 'deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /' > /etc/apt/sources.list.d/cuda.list
然后 apt update
又报错:
error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
重点:
NO_PUBKEY 467B942D3A79BD29
缺少公钥?
重新获取公钥并加入到 apt 信任密钥
1、获取 gpg 公钥
gpg --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
2、导出公钥,加入到 apt 信任密钥
gpg --export --armor A4B469963BF863CC | apt-key add -
3、update
但由于在对docker容器中如何获取英伟达显卡信息,多次尝试无果,暂且搁置该方案,转为采用anaconda进行TensorFlow_gpu版本的部署
标签:容器,--,apt,cuda,gpu,TensorFlow,docker,developer 来源: https://www.cnblogs.com/whiteBear/p/16212014.html