I am trying to access my host GPUs in a docker container. However, while running a basic check to see if docker container can access the GPU, it keeps failing with the below error:
Dockerfile
# FROM nvidia/cuda:10.2-base
FROM nvidia/cuda:11.2.0-cudnn8-runtime-ubi7
CMD ["nvidia-smi"]
# docker build -f Dockerfile_NVIDIA --tag nvidia-test .
# docker run --gpus=all nvidia-test
# docker run --gpus all nvidia-test
Error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: driver error: failed to process request: unknown.
I tried referring to this SO answer but of no help.