Ask Your Question
0

H/W acceleration w/Docker: Error response from daemon: OCI runtime create failed

asked 2019-11-20 18:42:33 -0600

130s gravatar image

updated 2019-11-20 19:12:55 -0600

Might not be really ROS question but I'm stuck on wiki.ros.org article http://wiki.ros.org/docker/Tutorials/..., so still posting here. Goal is to be able to run RViz from inside the Docker container.

$ ./run_my_image.bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"process_linux.go:413: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: driver error: failed to process request\\\\n\\\"\"": unknown.

I had to do some dependency cleanup.

sudo apt-get install nvidia-docker2
sudo apt-get -f install
sudo apt-get install docker.io
sudo apt-get install  nvidia-docker2
sudo pkill -SIGHUP dockerd

Dockerfile. I tried both base images in here but got the same.

# http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration

#FROM ros:melodic-ros-base
FROM osrf/ros:melodic-desktop-full

# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics

$ apt-cache policy nvidia-docker2
nvidia-docker2:
  Installed: 2.2.2-1

Noticed nvidia- driver pkg wasn't installed. But installing one didn't change anything.

$ sudo apt-get install nvidia-384
$ ./run_docker-image_nvidia.bash 
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"process_linux.go:413: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: cuda error: unknown error\\\\n\\\"\"": unknown.

GPU is indeed Nvidia.

$ lspci -vnn | grep VGA -A 12  
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06) (prog-if 00 [VGA controller])
        Subsystem: Lenovo Skylake Integrated Graphics [17aa:222e]
        Flags: bus master, fast devsel, latency 0, IRQ 131
        Memory at c2000000 (64-bit, non-prefetchable) [size=16M]
        Memory at 60000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 5000 [size=64]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31) (prog-if 30 [XHCI])
        Subsystem: Lenovo Sunrise Point-H USB 3.0 xHCI Controller [17aa:222e]
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107GLM [Quadro M1000M] [10de:13b1] (rev a2) (prog-if 00 [VGA controller])
        Subsystem: Lenovo GM107GLM [Quadro M1000M] [17aa:222e]
        Flags: fast devsel, IRQ 130
        Memory at c3000000 (32-bit, non-prefetchable) [size=16M]
        Memory at b0000000 (64-bit, prefetchable) [size=256M]
        Memory at c0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 4000 [size=128]
        Expansion ROM at c4080000 [disabled] [size=512K]
        Capabilities: <access denied>
        Kernel driver in use: nouveau
        Kernel modules: nvidiafb, nouveau

01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fbc] (rev a1)

Running the same image without the script, it starts (actually I pushed the image I use to my public hub below0.

$ docker run -it d130s/ros:melodic-ros-base_nvidia bash
root@8503822db2b0:/#
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-12-03 22:52:47 -0600

ruffsl gravatar image

Once your sure you have the latest version of nvidia-docker installed (its changed again recently so check you've installed the latest package/repo-source), try using rocker when running GUI with docker:

Related: https://answers.ros.org/question/3377...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-11-20 18:42:33 -0600

Seen: 170 times

Last updated: Dec 03 '19