安装nvidia-container-runtime

root@GPU:/home/python/docker# apt-get install nvidia-container-runtime
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
nvidia-container-runtime : Depends: nvidia-container-toolkit (>= 1.7.0-1) but it is not going to be installed
Depends: nvidia-container-toolkit (< 2.0.0) but it is not going to be installed
nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 9.1.85-3ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

  1. apt install nvidia-cuda-dev=9.1.85-3ubuntu1

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libdouble-conversion1 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5 libqt5svg5
libqt5webchannel5 libqt5webkit5 libqt5widgets5 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 qt5-gtk-platformtheme qttranslations5-l10n
Use ‘sudo apt autoremove’ to remove them.
Recommended packages:
libnvcuvid1
The following NEW packages will be installed:
nvidia-cuda-dev
0 upgraded, 1 newly installed, 0 to remove and 430 not upgraded.
1 not fully installed or removed.
Need to get 0 B/263 MB of archives.
After this operation, 734 MB of additional disk space will be used.
(Reading database … 136624 files and directories currently installed.)
Preparing to unpack …/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb …

Progress: [ 0%] […]
Unpacking nvidia-cuda-dev (9.1.85-3ubuntu1) …]
dpkg: error processing archive /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb (–unpack):
trying to overwrite ‘/usr/include/cublas.h’, which is also in package libcublas-dev 10.2.2.89-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

  1. 解决方法:

sudo dpkg -i --force-overwrite
/var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb

(Reading database … 136624 files and directories currently installed.)
Preparing to unpack …/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb …
Unpacking nvidia-cuda-dev (9.1.85-3ubuntu1) …
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/include/cublas.h’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/include/cublasXt.h’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/include/cublas_api.h’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/include/cublas_v2.h’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/include/nvblas.h’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/lib/x86_64-linux-gnu/libcublas_static.a’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/lib/x86_64-linux-gnu/stubs/libcublas.so’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/lib/x86_64-linux-gnu/libcublas.so’, which is also in package libcublas-dev 10.2.2.89-1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite ‘/usr/lib/x86_64-linux-gnu/libnvblas.so’, which is also in package libcublas-dev 10.2.2.89-1
Setting up nvidia-cuda-dev (9.1.85-3ubuntu1) …
Processing triggers for man-db (2.8.3-2ubuntu0.1) …

  1. root@GPU:/home/python/docker# apt install libcublas-dev=10.2.2.89-1

Reading package lists… Done
Building dependency tree
Reading state information… Done
libcublas-dev is already the newest version (10.2.2.89-1).
libcublas-dev set to manually installed.
The following packages were automatically installed and are no longer required:
libdouble-conversion1 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5 libqt5svg5
libqt5webchannel5 libqt5webkit5 libqt5widgets5 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 qt5-gtk-platformtheme qttranslations5-l10n
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 430 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nvidia-cuda-toolkit (9.1.85-3ubuntu1) …

Progress: [ 0%] […]
Progress: [ 25%] [#######################################…]
Progress: [ 50%] [####################################

  1. apt install nvidia-cuda-toolkit

Reading package lists… Done
Building dependency tree
Reading state information… Done
nvidia-cuda-toolkit is already the newest version (9.1.85-3ubuntu1).
The following packages were automatically installed and are no longer required:
libdouble-conversion1 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5 libqt5svg5
libqt5webchannel5 libqt5webkit5 libqt5widgets5 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 qt5-gtk-platformtheme qttranslations5-l10n
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 430 not upgraded.

  1. 再安装apt-get install nvidia-container-runtime成功!
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐