I want to add the nvidia runtime to my docker. Note that i am running windows 11. Docker Desktop v.4.24.2 on Windows integrated on WSL 2 NVIDIA Drivers 545.84
I installed everything as nvidia-container-toolkit and in the wsl that is running ubuntu 22.04 LTS I am able to run
docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -v .:/app nvcr.io/nvidia/pytorch:22.07-py3
And it actually loads my GPU with everything it needs. I know this because i am able to execute inside a jupyter notebook
import torch
for i in range(torch.cuda.device_count()):
print(torch.cuda.get_device_properties(i).name)
And it shows my GPU (RTX 2080 SUPER)
But if i want to use the flag --runtime=nvidia it says
docker: Error response from daemon: unknown or invalid runtime name: nvidia. See 'docker run --help'.
I want to use it inside a docker compose:
version: '3'
services:
pytorch_container:
image: nvcr.io/nvidia/pytorch:22.07-py3
command: ["bash"]
volumes:
- .:/app
runtime: nvidia
ipc: host
ulimits:
memlock: -1
stack: 67108864
stdin_open: true
tty: true
It doesnt run because it doesnt find the nvidia runtime
I already tried https://mcmap.net/q/563506/-add-nvidia-runtime-to-docker-runtimes and still nothing