阻止nvidia-docker通过Debian软件包安装nvidia驱动程序

时间:2019-12-18 11:35:11

标签: docker driver nvidia nvidia-docker

我正在尝试为我的特定应用程序安装TensorRT创建nvidia-docker映像。我无法使用任何提供的TensortRT基本映像,因为它们使用的CUDA版本与应用程序不兼容,但是我有一个自定义的TensorRT debian软件包,该软件包已在我的组织中使用。问题是,当我从Dockerfile安装它时,它还会安装nvidia驱动程序。结果,容器创建成功,但是无法启动-结果是:

svc_moma_usr@PL1LXD-529389:~/gutkowsp/Docker_projects/test_cuda$ nvidia-docker run tensorrt-test
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:432: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/97f449ff2535b1ad304520dae75c613931888658a66b89235b0d040a872a625c/merged/usr/bin/nvidia-smi: file exists\\\\n\\\"\"": unknown.
ERRO[0001] error waiting for container: context canceled

dockerfile是:

FROM nvidia/cuda:9.1-devel-ubuntu16.04

ENV DEBIAN_FRONTEND noninteractive
ENV CUDNN_VERSION 7.0.5.15
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"

RUN apt update -y && \
    apt install software-properties-common -y && \
    apt-add-repository --yes --update ppa:ansible/ansible && \
    apt install ansible -y

RUN apt update -y && \
    apt install -y --no-install-recommends \
    libcudnn7=$CUDNN_VERSION-1+cuda9.1 \
    libcudnn7-dev=$CUDNN_VERSION-1+cuda9.1

RUN apt update -y && \
    apt install tensorrt -y

如何解决这个不必要的驱动程序问题?在我看来,这似乎是一个常见问题,因为通常在nvidia中,docker映像通常安装了nvidia软件,该软件通常随驱动程序一起提供。也许有人可以共享TensorRT映像的dockerfile供参考?

0 个答案:

没有答案