【docker-cuda】——base,runtime,devel的区别

翻译自:https://github.com/NVIDIA/nvidia-docker/wiki/CUDA

Description
CUDA图像有三种风格,可以通过NVIDIA公共集线器存储库获得。

  • 基础:从CUDA 9.0开始,包含了部署预构建CUDA应用程序的最低限度(libcudart)。

如果你想手动选择你想要安装的CUDA包,请使用这个映像。

  • 运行时:通过添加CUDA工具包中的所有共享库扩展基本映像。

如果您有一个使用多个CUDA库的预构建应用程序,请使用此图像。

  • devel:通过添加编译器工具链、调试工具、头文件和静态库来扩展运行时映像。

使用这个图像从源代码编译一个CUDA应用程序。

例子

Running an interactive CUDA session isolating the first GPU
docker run -ti --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 nvidia/cuda

Querying the CUDA 7.5 compiler version
docker run --rm --runtime=nvidia nvidia/cuda:7.5-devel nvcc --version

总结

  • runtime的包,没有cuda的编译工具nvcc
>>> docker run --rm nvidia/cuda:11.1-runtime-ubuntu16.04 nvcc --version
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "nvcc": executable file not found in $PATH: unknown.
  • devel的,是有cuda的nvcc包的
>>> docker run --rm nvidia/cuda:11.1-cudnn8-devel-ubuntu16.04 nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0
  • 5
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值