问题
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.
How should I make a docker image to be able to use Anaconda with GPU?
回答1:
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.
Source: GPU Acceleration in Windows Containers
来源:https://stackoverflow.com/questions/60333690/how-to-make-a-docker-image-with-anaconda-and-be-able-to-use-gpu