Camera Availability

Hi all,

It is one of the most exciting things to use CUDA and GPUs directly within Windows recently. Big thanks to all teams from both Nvidia and Microsoft. Now I can use all my previous CUDA docker containers inside Windows.

I have a question regarding to camera utilization within WSL 2 (Ubuntu 18.04). Is it possible to use connected cameras within the nvidia-docker containers in WSL 2? If not directly, is there any possible workaround for it?

And also I am getting an error when I try to run one of my containers (a custom Detectron2 container). The error is:

$ sudo docker run -ti --gpus all -p 8888:8888 <private-registry>/repository:detectron2
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:432: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/2451df56e9063f9b8c07f0234f9f2ce58961b4da61fa33130d5fefaf7c0521f1/merged/usr/lib/x86_64-linux-gnu/libcuda.so.1: file exists\\\\n\\\"\"": unknown.
ERRO[0001] error waiting for container: context canceled

I don’t have any problems with running this container with the exact same command withing native Ubuntu 18.04 by the way. So why WSL side can’t mount and overwrite an existing file which is already in place inside the container?

The error you mentioned could be due to incorrect NVidia container toolkit installed or the driver.
Please make sure to install the latest driver (the link to download in mentioned in the blog or in User Guide) and install the right nvidia-docker2 package.

I ran into the same issue.

As suggested I ran:

sudo apt-get install -y nvidia-docker2

but that made no difference, still the same error.

dockerd logs:

INFO[2020-06-26T15:39:43.305973300+02:00] shim containerd-shim started address="/containerd-shim/moby/b1ea3e2b9cc999e3502d8a07be39ad0ade985639005a5577a9048f83eedf89c5/shim.sock" debug=false pid=4184 INFO[2020-06-26T15:39:43.351992500+02:00] shim reaped id=b1ea3e2b9cc999e3502d8a07be39ad0ade985639005a5577a9048f83eedf89c5 ERRO[2020-06-26T15:39:43.362376000+02:00] stream copy error: reading from a closed fifo ERRO[2020-06-26T15:39:43.362430300+02:00] stream copy error: reading from a closed fifo ERRO[2020-06-26T15:39:43.548812000+02:00] b1ea3e2b9cc999e3502d8a07be39ad0ade985639005a5577a9048f83eedf89c5 cleanup: failed to delete container from containerd: no such container ERRO[2020-06-26T15:39:43.548853200+02:00] Handler for POST /v1.40/containers/b1ea3e2b9cc999e3502d8a07be39ad0ade985639005a5577a9048f83eedf89c5/start returned error: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:432: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/8a02c1a7f306da446633de51f4d20b9394b5c4ee3ab840bea8f36fa33923893e/merged/usr/lib/x86_64-linux-gnu/libcuda.so.1: file exists\\\\n\\\"\"": unknown

Like Doruk, I’m trying to run Detectron2 in the mmdetection container:

docker run --gpus all wgting96/mmdetection:cuda101
1 Like