如何使用Anaconda制作docker映像并能够使用GPU? [英] How to make a docker image with Anaconda and be able to use GPU?
问题描述
我安装了GPU和CUDA驱动程序.我正在使用docker hub上提供的官方anaconda映像制作docker映像.当我在docker映像中使用命令nvidia-smi时,它显示未安装CUDA DRIVER.
I have a GPU, and CUDA driver installed. I am making a docker image using the official anaconda image available at docker hub. When I use the command nvidia-smi inside the docker image, it shows there is no CUDA DRIVER installed.
我应该如何制作一个可以在GPU上使用Anaconda的docker映像?
How should I make a docker image to be able to use Anaconda with GPU?
推荐答案
Docker 19.03具有对NVIDIA GPU的本地支持.安装 nvidia-container-runtime
,并在Anaconda容器中使用 docker run --gpus all
标志.请记住,您可以使用Docker 19.03在Windows主机上运行具有GPU加速功能的Windows容器,而不能在Linux容器上运行.
Docker 19.03 has native support for NVIDIA GPUs. Install nvidia-container-runtime
and use the docker run --gpus all
flag with your Anaconda container. Remember, that you can run Windows containers with GPU acceleration on a Windows host using Docker 19.03, but not a Linux container.
来源: Windows容器中的GPU加速
这篇关于如何使用Anaconda制作docker映像并能够使用GPU?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!