> For the complete documentation index, see [llms.txt](https://lwang010.gitbook.io/longw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lwang010.gitbook.io/longw/mlops/chap-6.-team-infra/intro/docker-with-gpu.md).

# Docker with GPU

The `nvidia/cuda:10.2-base` will only get you `nvidia-smi.` If you need `cuDNN` or `nvcc --version` you can pull from other NVIDIA Docker base images, namely: `nvidia/cuda:10.2-devel-ubuntu18.0.` (gets you nvcc cuda toolkit) and`nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04.` (gets you cuDNN).

* TRT under AI-LAB: <https://github.com/amineHY/AI-LAB/blob/master/Dockerfile>
* conda list, make sure it is

  cudatoolkit               10.0.130                      0

  cudnn                     7.6.4                cuda10.0\_0

  then I removed all cudas from /usr/local/cuda and installed sudo sh cuda\_10.1.105\_418.39\_linux.run to install cuda 10 and the driver

reference:

<https://towardsdatascience.com/how-to-properly-use-the-gpu-within-a-docker-container-4c699c78c6d1>
