docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error
The template below is mostly useful for bug reports and support questions. Feel free to remove anything which doesn't apply to you and add more information where it makes sense.
Also, before reporting a new issue, please make sure that:
- You read carefully the documentation and frequently asked questions.
- You searched for a similar issue and this is not a duplicate of an existing one.
- This issue is not related to NGC, otherwise, please use the devtalk forums instead.
- You went through the troubleshooting steps.
1. Issue or feature description
I'm tring to install nvidia-docker v2, and follow the steps
at the last step:
docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
it will have error message:
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/56ca0b73c5720021671123b7f44c885bb1e7b42957c9b18e7b509be26760b993/log.json: no such file or directory): nvidia-container-runtime did not terminate sucessfully: unknown.
2. Steps to reproduce the issue
- Just the same as the readme here
3. Information to attach (optional if deemed irrelevant)
- [ ] Some nvidia-container information:
nvidia-container-cli -k -d /dev/tty info`e3380-8b5c-cbf2-8bb2-1bcced59103d at 00000000:01:00.0) NVRM version: 418.56 CUDA version: 10.1
Device Index: 0 Device Minor: 0 Model: GeForce GTX 1080 Ti Brand: GeForce GPU UUID: GPU-e17e3380-8b5c-cbf2-8bb2-1bcced59103d Bus Location: 00000000:01:00.0 Architecture: 6.1 I0720 05:40:32.999897 19015 nvc.c:318] shutting down library context I0720 05:40:33.000865 19017 driver.c:192] terminating driver service I0720 05:40:33.010816 19015 driver.c:233] driver service terminated successfully`
-
[ ] Kernel version from
uname -aLinux cp 4.4.0-154-generic #181-Ubuntu SMP Tue Jun 25 05:29:03 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux -
[ ] Any relevant kernel output lines from
dmesg -
[ ] Driver information from
nvidia-smi -a`Timestamp : Sat Jul 20 13:42:03 2019 Driver Version : 418.56 CUDA Version : 10.1
Attached GPUs : 1 GPU 00000000:01:00.0 Product Name : GeForce GTX 1080 Ti`
- [ ] Docker version from
docker version`Client: Version: 18.06.1-ce API version: 1.38 Go version: go1.10.3 Git commit: e68fc7a Built: Tue Aug 21 17:24:56 2018 OS/Arch: linux/amd64 Experimental: false
Server: Engine: Version: 18.06.1-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: e68fc7a Built: Tue Aug 21 17:23:21 2018 OS/Arch: linux/amd64 Experimental: false`
-
[ ] NVIDIA packages version from
dpkg -l '*nvidia*'orrpm -qa '*nvidia*'Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii libnvidia-cont 1.0.2-1 amd64 NVIDIA container runtime library ii libnvidia-cont 1.0.2-1 amd64 NVIDIA container runtime library un nvidia-304 <none> <none> (no description available) un nvidia-340 <none> <none> (no description available) un nvidia-384 <none> <none> (no description available) un nvidia-common <none> <none> (no description available) ii nvidia-contain 3.0.0-1 amd64 NVIDIA container runtime ii nvidia-contain 1.4.0-1 amd64 NVIDIA container runtime hook un nvidia-docker <none> <none> (no description available) ii nvidia-docker2 2.1.0-1 all nvidia-docker CLI wrapper un nvidia-libopen <none> <none> (no description available) un nvidia-prime <none> <none> (no description available) -
[ ] NVIDIA container library version from
nvidia-container-cli -Vversion: 1.0.2 -
[ ] NVIDIA container library logs (see troubleshooting)
-
[ ] Docker command, image and tag used
tensorflow/tensorflow:nightly-gpu-py3-jupyter
Can anyone help me? Thanks.
We need more information.
Can you do this:
- In file
/etc/nvidia-container-runtime/config.toml, add this:
[nvidia-container-runtime]
debug = "/var/log/nvidia-container-runtime"
- Run
docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi - Give the content of
/var/log/nvidia-container-runtime
@Ethyling thanks for your help.
2019/07/21 19:46:34 Running nvidia-container-runtime
2019/07/21 19:46:34 Using bundle file: /var/run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/ffb99321f8a60d6cccf1a461ce7782d24b00217e530138d8aa779d98c2ec27a0/config.json
2019/07/21 19:46:34 Prestart hook path: /usr/bin/nvidia-container-runtime-hook
2019/07/21 19:46:34 Prestart hook added, executing runc
2019/07/21 19:46:34 ERROR: find runc path: exec: "runc": executable file not found in $PATH
That is the content.
Can you do this too, and give us the output:
- Run
whereis runc - Run
whereis docker-runc
Thank you!
I'm getting EXACTLY the same error as the reporter, on all my dev, staging, and production systems, as soon as ElasticBeanstalk tries to create new servers. Code / Config hasn't been touched in 15 days, and everything has been stable for the last 2 weeks, so something referenced during EC2 startup is failing ( I hardcode my nvidia driver install etc into my baked AMI ). the only thing it could be really is the nvidia-docker install as that is installed on server startup. Again, I've not changed anything !, it's just suddenly started happening ! Hope you guys can fix this asap or suggest a work-around !
I am also seeing this same issue @mikecouk. We use nvidia-docker on some AWS beanstalk environments. Starting last Friday, deploys stopped working due to this issue. It looks like some automatic updates trigger and update nvidia-docker, and now it no longer works.
We are currently working on this, but first we need more information:
Can you do this too, and give us the output:
1. Run `whereis runc` 2. Run `whereis docker-runc`Thank you!
@Ethyling :
`[ec2-user]$ whereis runc
runc:
[ec2-user]$ whereis docker-runc
docker-runc: /usr/bin/docker-runc
`
@mikeobr Thank you, I will come back to you asap
We're currently testing a fix by aliasing docker-runc to runc, which as you've already worked out doesn't exist anymore :) Will get back to you asap.
Hi, I am facing the same problem. This is the output of command.
$ whereis runc
runc:
$ whereis docker-runc
docker-runc: /usr/bin/docker-runc /usr/bin/X11/docker-runc
thanks
Working with @mikecouk on this one. While yum provides runc still lists the AWS Docker packages, none of the published 18.06 versions actually installed the runc binary (we tried downgrading to all of them).
The "brett hack" to give it it's official name has fixed our problem, currently rolling it out to all servers before they have a chance to die and respawn ( we use spot instances ! ). The line you'll want for the moment in your scripts AFTER then nvidia-docker2 yum install is ;
if [ \! -f /usr/bin/runc -a -f /usr/bin/docker-runc ]; then ln -s /usr/bin/docker-runc /usr/bin/runc; else echo "DID NOT CREATE RUNC SYMLINK"; fi
Phew, panic over the for the moment, but could do with an explanation on this ( even if it's blame AWS ! )
Please use the 'brett hack' for the time being. This is a combination of two underlying non-issues that make an issue because of incompatibility:
- nvidia-container-runtime has a new release that uses the existing runc binary on host rather than compiling and shipping its own.
- The host may not have the 'runc' binary after all. It is called docker-runc instead.
What next: a new release in the pend for nvidia-docker that will look for docker-runc if runc is not found. It is still better to chase the binary's new name rather than chase its version, so point number '1' from above is here to stay.
I am getting the same runc error, but I am using Ubuntu. Can someone tell me what is the "brett hack" version for this?
I am getting the same runc error, but I am using Ubuntu. Can someone tell me what is the "brett hack" version for this?
Create a runc symlink to point to docker-runc.
As @mikecouk will do it:
if [ \! -f /usr/bin/runc -a -f /usr/bin/docker-runc ]; then ln -s /usr/bin/docker-runc /usr/bin/runc; else echo "DID NOT CREATE RUNC SYMLINK"; fi
The brett hack works, thanks for the quick workaround.
@mikecouk
( even if it's blame AWS ! )
I'm pretty sure AWS ElasticBeanstalk runs something like a yum update during install, I've had a similar issue before where stuff started breaking with no code changes. If you find a good way to lock versions or prevent this, I'd be happy to know 😃
sudo ln -s /usr/bin/nvidia-container-toolkit /usr/bin/nvidia-container-runtime-hook
Solved the problem for me
Is anyone else having issues again today? I put the Brett hack into place yesterday and it resolved the issue. Today I am seeing the same problem again (unable to retrieve OCI runtime error) with the workaround in place.
This is on AWS Beanstalk, so I'm not sure if it pulled a newer version.
EDIT: @ramab1988 's alias works for resolving the issue. Did something change that caused the initial workaround to no longer worker?
Hi @mikeobr, can you do this please:
- In file
/etc/nvidia-container-runtime/config.toml, add this:
[nvidia-container-runtime]
debug = "/var/log/nvidia-container-runtime"
- Run
docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi - Give the content of
/var/log/nvidia-container-runtime - Run
whereis runc - Run
whereis docker-runc - Give the output
It will help us a lot, thank you!