docker镜像是分层的,每一层都依赖前一层,所以下面的安装步骤不能颠倒顺序。
Description
CUDA images come in three flavors and are available through the NVIDIA public hub repository.
base: starting from CUDA 9.0, contains the bare minimum (libcudart) to deploy a pre-built CUDA application.Use this image if you want to manually select which CUDA packages you want to install.
runtime: extends the base image by adding all the shared libraries from the CUDA toolkit.Use this image if you have a pre-built application using multiple CUDA libraries.
devel: extends the runtime image by adding the compiler toolchain, the debugging tools, the headers and the static libraries.Use this image to compile a CUDA application from sources.
我们直接安装到顶配版devel
1、登录https://hub.docker.com/,搜索nvidia/cuda